docker-compose.yaml 3.5 KB

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