Advertisement
Mochinov

Untitled

Aug 27th, 2023
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 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. env_file:
  16. - .env
  17. volumes:
  18. - ../src:/code/src
  19. depends_on:
  20. - db
  21. - redis
  22. networks:
  23. - paynocchio
  24.  
  25. db:
  26. image: postgres:14-alpine
  27. env_file:
  28. - .env.db
  29. ports:
  30. - "${POSTGRES_PORT}:${POSTGRES_PORT}"
  31. environment:
  32. POSTGRES_USER: "${POSTGRES_USER}"
  33. POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
  34. POSTGRES_PORT: "${POSTGRES_PORT}"
  35. POSTGRES_DB: "${POSTGRES_DB}"
  36. POSTGRES_HOST: "${POSTGRES_HOST}"
  37. networks:
  38. - paynocchio
  39. volumes:
  40. - ./init_db.sql:/docker-entrypoint-initdb.d/init_db.sql
  41.  
  42. redis:
  43. image: redis:7-alpine3.18
  44. ports:
  45. - '${REDIS_PORT}:6379'
  46. networks:
  47. - paynocchio
  48.  
  49. networks:
  50. paynocchio:
  51. driver: bridge
  52.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement