docker-compose.yml 622 B

1234567891011121314151617181920212223242526272829
  1. version: "3.9"
  2. services:
  3. postgres:
  4. image: postgres:15
  5. container_name: postgres
  6. environment:
  7. - POSTGRES_USER=messenger_user
  8. - POSTGRES_PASSWORD=password
  9. - POSTGRES_DB=messenger_db
  10. ports:
  11. - "54321:5432"
  12. restart: unless-stopped
  13. flask:
  14. build: .
  15. container_name: flask
  16. environment:
  17. - POSTGRES_HOST=postgres
  18. - POSTGRES_PORT=5432
  19. - POSTGRES_USER=messenger_user
  20. - POSTGRES_PASSWORD=password
  21. - POSTGRES_DB=messenger_db
  22. - FLASK_ENV=development
  23. depends_on:
  24. - postgres
  25. ports:
  26. - "5000:8080"
  27. restart: unless-stopped