docker-compose.yaml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. ports:
  26. # Map port 8000 in the container to port 8000 on the host
  27. # This way we can access the forum through http://localhost:8000
  28. - "${MISAGO_DEVSERVER_PORT:-8000}:8000"
  29. depends_on:
  30. - postgres
  31. - redis
  32. tty: true
  33. volumes:
  34. # Map in the entire project into the container
  35. # This makes sure files in the container updates on the fly as we were working locally
  36. - .:/srv/misago:Z
  37. celery:
  38. build: .
  39. command: celery -A tasks worker --loglevel=info
  40. environment:
  41. # Postgres
  42. - POSTGRES_USER=misago
  43. - POSTGRES_PASSWORD=misago
  44. - POSTGRES_DB=misago
  45. - POSTGRES_HOST=postgres
  46. - POSTGRES_TEST_DB=misago_test
  47. # Superuser
  48. - SUPERUSER_USERNAME=Admin
  49. - SUPERUSER_EMAIL=admin@example.com
  50. - SUPERUSER_PASSWORD=password
  51. ports:
  52. # Map port 8000 in the container to port 8000 on the host
  53. # This way we can access the forum through http://localhost:8000
  54. - "${MISAGO_DEVSERVER_PORT:-8000}:8000"
  55. depends_on:
  56. - postgres
  57. - redis
  58. tty: true
  59. volumes:
  60. # Map in the entire project into the container
  61. # This makes sure files in the container updates on the fly as we were working locally
  62. - .:/srv/misago:Z