Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '3.9'
- name: admin-panel
- services:
- backend:
- container_name: admin-panel-api
- build:
- context: ..
- dockerfile: compose/Dockerfile
- working_dir: /code/src
- command: >
- sh -c "(cd .. && alembic upgrade head) &&
- uvicorn main:app --reload --host 0.0.0.0 --port 80 --forwarded-allow-ips='*' --proxy-headers"
- ports:
- - "8081:80"
- env_file:
- - .env
- volumes:
- - ../src:/code/src
- depends_on:
- - db
- - redis
- networks:
- - paynocchio
- db:
- image: postgres:14-alpine
- env_file:
- - .env.db
- ports:
- - "${POSTGRES_PORT}:${POSTGRES_PORT}"
- environment:
- POSTGRES_USER: "${POSTGRES_USER}"
- POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
- POSTGRES_PORT: "${POSTGRES_PORT}"
- POSTGRES_DB: "${POSTGRES_DB}"
- POSTGRES_HOST: "${POSTGRES_HOST}"
- networks:
- - paynocchio
- volumes:
- - ./init_db.sql:/docker-entrypoint-initdb.d/init_db.sql
- redis:
- image: redis:7-alpine3.18
- ports:
- - '${REDIS_PORT}:6379'
- networks:
- - paynocchio
- networks:
- paynocchio:
- driver: bridge
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement