docker-compose.yaml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. celery:
  6. build: .
  7. command: celery -A tasks worker --loglevel=info
  8. environment:
  9. # Postgres
  10. - POSTGRES_USER=misago
  11. - POSTGRES_PASSWORD=misago
  12. - POSTGRES_DB=misago
  13. - POSTGRES_HOST=postgres
  14. - POSTGRES_TEST_DB=misago_test
  15. # Superuser
  16. - SUPERUSER_USERNAME=Admin
  17. - SUPERUSER_EMAIL=admin@example.com
  18. - SUPERUSER_PASSWORD=password
  19. ports:
  20. # Map port 8000 in the container to port 8000 on the host
  21. # This way we can access the forum through http://localhost:8000
  22. - "${MISAGO_DEVSERVER_PORT:-8000}:8000"
  23. depends_on:
  24. - postgres
  25. tty: true
  26. volumes:
  27. # Map in the entire project into the container
  28. # This makes sure files in the container updates on the fly as we were working locally
  29. - .:/srv/misago:Z
  30. postgres:
  31. image: postgres:10
  32. environment:
  33. - POSTGRES_USER=misago
  34. - POSTGRES_PASSWORD=misago
  35. ports:
  36. - '127.0.0.1:5432:5432'
  37. redis:
  38. image: redis:5
  39. restart: unless-stopped
  40. networks:
  41. - misago
  42. volumes:
  43. - misago-redis:/data
  44. misago:
  45. build: .
  46. command: python manage.py runserver 0.0.0.0:8000
  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