docker-compose.yaml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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. networks:
  16. - misago
  17. misago:
  18. build: .
  19. command: python manage.py runserver 0.0.0.0:8000
  20. environment:
  21. # Postgres
  22. - POSTGRES_USER=misago
  23. - POSTGRES_PASSWORD=misago
  24. - POSTGRES_DB=misago
  25. - POSTGRES_HOST=postgres
  26. - POSTGRES_TEST_DB=misago_test
  27. # Superuser
  28. - SUPERUSER_USERNAME=Admin
  29. - SUPERUSER_EMAIL=admin@example.com
  30. - SUPERUSER_PASSWORD=password
  31. ports:
  32. # Map port 8000 in the container to port 8000 on the host
  33. # This way we can access the forum through http://localhost:8000
  34. - "${MISAGO_DEVSERVER_PORT:-8000}:8000"
  35. depends_on:
  36. - postgres
  37. tty: true
  38. volumes:
  39. # Map in the entire project into the container
  40. # This makes sure files in the container updates on the fly as we were working locally
  41. - .:/srv/misago:Z
  42. celery:
  43. build: .
  44. command: celery -A tasks worker --loglevel=info
  45. environment:
  46. # Postgres
  47. - POSTGRES_USER=misago
  48. - POSTGRES_PASSWORD=misago
  49. - POSTGRES_DB=misago
  50. - POSTGRES_HOST=postgres
  51. - POSTGRES_TEST_DB=misago_test
  52. # Superuser
  53. - SUPERUSER_USERNAME=Admin
  54. - SUPERUSER_EMAIL=admin@example.com
  55. - SUPERUSER_PASSWORD=password
  56. ports:
  57. # Map port 8000 in the container to port 8000 on the host
  58. # This way we can access the forum through http://localhost:8000
  59. - "${MISAGO_DEVSERVER_PORT:-8000}:8000"
  60. depends_on:
  61. - postgres
  62. tty: true
  63. volumes:
  64. # Map in the entire project into the container
  65. # This makes sure files in the container updates on the fly as we were working locally
  66. - .:/srv/misago:Z
  67. celery:
  68. build: .
  69. command: celery -A tasks worker --loglevel=info
  70. environment:
  71. # Postgres
  72. - POSTGRES_USER=misago
  73. - POSTGRES_PASSWORD=misago
  74. - POSTGRES_DB=misago
  75. - POSTGRES_HOST=postgres
  76. - POSTGRES_TEST_DB=misago_test
  77. # Superuser
  78. - SUPERUSER_USERNAME=Admin
  79. - SUPERUSER_EMAIL=admin@example.com
  80. - SUPERUSER_PASSWORD=password
  81. ports:
  82. # Map port 8000 in the container to port 8000 on the host
  83. # This way we can access the forum through http://localhost:8000
  84. - "${MISAGO_DEVSERVER_PORT:-8000}:8000"
  85. depends_on:
  86. - postgres
  87. tty: true
  88. volumes:
  89. # Map in the entire project into the container
  90. # This makes sure files in the container updates on the fly as we were working locally
  91. - .:/srv/misago:Z
  92. celery:
  93. build: .
  94. command: celery -A tasks worker --loglevel=info
  95. environment:
  96. # Postgres
  97. - POSTGRES_USER=misago
  98. - POSTGRES_PASSWORD=misago
  99. - POSTGRES_DB=misago
  100. - POSTGRES_HOST=postgres
  101. - POSTGRES_TEST_DB=misago_test
  102. ports:
  103. # Map port 8000 in the container to port 8000 on the host
  104. # This way we can access the forum through http://localhost:8000
  105. - "${MISAGO_DEVSERVER_PORT:-8000}:8000"
  106. depends_on:
  107. - postgres
  108. tty: true
  109. volumes:
  110. # Map in the entire project into the container
  111. # This makes sure files in the container updates on the fly as we were working locally
  112. - .:/srv/misago:Z