Advertisement
Mochinov

Untitled

Aug 25th, 2023
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 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.  
  23. db:
  24. image: postgres:15-alpine3.18
  25. ports:
  26. - "${POSTGRES_PORT}:${POSTGRES_PORT}"
  27. environment:
  28. POSTGRES_USER: "${POSTGRES_USER}"
  29. POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
  30. POSTGRES_PORT: "${POSTGRES_PORT}"
  31. POSTGRES_DB: "${POSTGRES_DB}"
  32. POSTGRES_HOST: "${POSTGRES_HOST}"
  33. volumes:
  34. - ./init_db.sql:/docker-entrypoint-initdb.d/init_db.sql
  35.  
  36. redis:
  37. image: redis:7-alpine3.18
  38. ports:
  39. - '${REDIS_PORT}:6379'
  40.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement