Advertisement
Mochinov

Untitled

Oct 2nd, 2023
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. version: '3.9'
  2. name: admin-panel
  3. services:
  4. backend:
  5. container_name: admin-panel-api
  6. build:
  7. context: ..
  8. dockerfile: compose/Dockerfile
  9. working_dir: /code/src
  10. command: >
  11. sh -c "(cd .. && alembic upgrade head) &&
  12. uvicorn main:app --reload --host 0.0.0.0 --port 80 --forwarded-allow-ips='*' --proxy-headers"
  13. ports:
  14. - "8081:80"
  15. expose:
  16. - 80
  17. env_file:
  18. - .env
  19. volumes:
  20. - ../src:/code/src
  21. depends_on:
  22. - redis
  23. - db
  24. networks:
  25. - paynocchio
  26.  
  27. db:
  28. image: postgres:14-alpine
  29. restart: always
  30. env_file:
  31. - .env.db
  32. expose:
  33. - 5432
  34. ports:
  35. - "5432:5432"
  36. networks:
  37. - paynocchio
  38. volumes:
  39. - postgres-data-local:/var/lib/postgresql/data/
  40. - ./init_db.sql:/docker-entrypoint-initdb.d/init_db.sql
  41.  
  42. redis:
  43. image: redis:7-alpine3.18
  44. ports:
  45. - "6379:6379"
  46. networks:
  47. - paynocchio
  48.  
  49. volumes:
  50. postgres-data-local:
  51.  
  52. networks:
  53. paynocchio:
  54. driver: bridge
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement