docker-compose.yaml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. # This compose setup is only meant for local development of Misago itself
  2. # This is not for running your Misago site in docker
  3. version: "3.0"
  4. services:
  5. postgres:
  6. image: postgres:10
  7. environment:
  8. - POSTGRES_USER=misago
  9. - POSTGRES_PASSWORD=misago
  10. ports:
  11. - '127.0.0.1:5432:5432'
  12. redis:
  13. image: redis:5
  14. restart: unless-stopped
  15. misago:
  16. build: .
  17. command: python manage.py runserver 0.0.0.0:8000
  18. environment:
  19. # Postgres
  20. - POSTGRES_USER=misago
  21. - POSTGRES_PASSWORD=misago
  22. - POSTGRES_DB=misago
  23. - POSTGRES_HOST=postgres
  24. - POSTGRES_TEST_DB=misago_test
  25. # Superuser
  26. - SUPERUSER_USERNAME=Admin
  27. - SUPERUSER_EMAIL=admin@example.com
  28. - SUPERUSER_PASSWORD=password
  29. ports:
  30. # Map port 8000 in the container to port 8000 on the host
  31. # This way we can access the forum through http://localhost:8000
  32. - "${MISAGO_DEVSERVER_PORT:-8000}:8000"
  33. depends_on:
  34. - postgres
  35. tty: true
  36. volumes:
  37. # Map in the entire project into the container
  38. # This makes sure files in the container updates on the fly as we were working locally
  39. - .:/srv/misago:Z
  40. celery:
  41. build: .
  42. command: celery -A tasks worker --loglevel=info
  43. environment:
  44. # Postgres
  45. - POSTGRES_USER=misago
  46. - POSTGRES_PASSWORD=misago
  47. - POSTGRES_DB=misago
  48. - POSTGRES_HOST=postgres
  49. - POSTGRES_TEST_DB=misago_test
  50. # Superuser
  51. - SUPERUSER_USERNAME=Admin
  52. - SUPERUSER_EMAIL=admin@example.com
  53. - SUPERUSER_PASSWORD=password
  54. ports:
  55. # Map port 8000 in the container to port 8000 on the host
  56. # This way we can access the forum through http://localhost:8000
  57. - "${MISAGO_DEVSERVER_PORT:-8000}:8000"
  58. depends_on:
  59. - postgres
  60. tty: true
  61. volumes:
  62. # Map in the entire project into the container
  63. # This makes sure files in the container updates on the fly as we were working locally
  64. - .:/srv/misago:Z
  65. celery:
  66. build: .
  67. command: celery -A tasks worker --loglevel=info
  68. environment:
  69. # Postgres
  70. - POSTGRES_USER=misago
  71. - POSTGRES_PASSWORD=misago
  72. - POSTGRES_DB=misago
  73. - POSTGRES_HOST=postgres
  74. - POSTGRES_TEST_DB=misago_test
  75. # Superuser
  76. - SUPERUSER_USERNAME=Admin
  77. - SUPERUSER_EMAIL=admin@example.com
  78. - SUPERUSER_PASSWORD=password
  79. ports:
  80. # Map port 8000 in the container to port 8000 on the host
  81. # This way we can access the forum through http://localhost:8000
  82. - "${MISAGO_DEVSERVER_PORT:-8000}:8000"
  83. depends_on:
  84. - postgres
  85. tty: true
  86. volumes:
  87. # Map in the entire project into the container
  88. # This makes sure files in the container updates on the fly as we were working locally
  89. - .:/srv/misago:Z
  90. celery:
  91. build: .
  92. command: celery -A tasks worker --loglevel=info
  93. environment:
  94. # Postgres
  95. - POSTGRES_USER=misago
  96. - POSTGRES_PASSWORD=misago
  97. - POSTGRES_DB=misago
  98. - POSTGRES_HOST=postgres
  99. - POSTGRES_TEST_DB=misago_test
  100. ports:
  101. # Map port 8000 in the container to port 8000 on the host
  102. # This way we can access the forum through http://localhost:8000
  103. - "${MISAGO_DEVSERVER_PORT:-8000}:8000"
  104. depends_on:
  105. - postgres
  106. tty: true
  107. volumes:
  108. # Map in the entire project into the container
  109. # This makes sure files in the container updates on the fly as we were working locally
  110. - .:/srv/misago:Z