docker-compose.yaml 1.8 KB

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