docker-compose.yaml 1.7 KB

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