2024-03-04 07:12:29 +03:00
|
|
|
version: "3.8"
|
|
|
|
services:
|
|
|
|
db:
|
|
|
|
container_name: pgdb
|
|
|
|
|
|
|
|
image: postgres:15.1-alpine
|
|
|
|
|
|
|
|
env_file:
|
|
|
|
- .env
|
|
|
|
|
|
|
|
environment:
|
|
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
|
|
|
|
|
|
ports:
|
|
|
|
- 6432:5432
|
|
|
|
|
|
|
|
healthcheck:
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 5
|
|
|
|
|
|
|
|
|
|
|
|
api:
|
|
|
|
container_name: api
|
|
|
|
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: ./docker/api/Dockerfile
|
|
|
|
|
|
|
|
ports:
|
|
|
|
- 8000:8000
|
|
|
|
|
|
|
|
depends_on:
|
|
|
|
db:
|
|
|
|
condition: service_healthy
|
|
|
|
|
|
|
|
restart: always
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- ./config/api_config.yml:/usr/src/service_man/config/api_config.yml
|
|
|
|
- ./api:/usr/src/service_man/api
|
2024-03-31 00:58:43 +03:00
|
|
|
# - ./alembic.ini:/usr/src/service_man/alembic.ini
|
2024-03-04 07:12:29 +03:00
|
|
|
|
2024-04-10 00:33:31 +03:00
|
|
|
command: /bin/bash -c 'poetry run uvicorn api.app_entrypoint.main:app_factory --host 0.0.0.0 --reload --factory'
|
2024-03-04 07:12:29 +03:00
|
|
|
|
|
|
|
# bot:
|
|
|
|
# container_name: bot
|
|
|
|
#
|
|
|
|
# build:
|
|
|
|
# context: .
|
|
|
|
# dockerfile: ./docker/bot/Dockerfile
|
|
|
|
#
|
|
|
|
# env_file:
|
|
|
|
# - .env
|
|
|
|
#
|
|
|
|
# ports:
|
|
|
|
# - 8001:8000
|
|
|
|
#
|
|
|
|
# depends_on:
|
|
|
|
# db:
|
|
|
|
# condition: service_healthy
|
|
|
|
#
|
|
|
|
# restart: always
|
|
|
|
#
|
|
|
|
# volumes:
|
|
|
|
# - ./tg_bot:/usr/src/service_man/tg_bot
|
|
|
|
#
|
|
|
|
# command: /bin/bash -c 'cd /usr/src/service_man/tg_bot && poetry run uvicorn app:create_app --host 0.0.0.0 --reload --factory'
|
|
|
|
#
|
|
|
|
|
|
|
|
# celery_worker:
|
|
|
|
# container_name: celeryworker
|
|
|
|
#
|
|
|
|
# build:
|
|
|
|
# context: .
|
|
|
|
#
|
|
|
|
# env_file:
|
|
|
|
# - .env
|
|
|
|
#
|
|
|
|
# depends_on:
|
|
|
|
# - rabbitmq
|
|
|
|
# - db
|
|
|
|
# - app
|
|
|
|
# - redis
|
|
|
|
#
|
|
|
|
# volumes:
|
|
|
|
# - .:/usr/src/fastfood
|
|
|
|
#
|
|
|
|
# command: ["celery", "-A", "bg_tasks.bg_task:celery_app", "worker", "--loglevel=info", "--concurrency", "1", "-P", "solo"]
|
|
|
|
#
|
|
|
|
# celery_beat:
|
|
|
|
# container_name: celerybeat
|
|
|
|
#
|
|
|
|
# build:
|
|
|
|
# context: .
|
|
|
|
#
|
|
|
|
# env_file:
|
|
|
|
# - .env
|
|
|
|
#
|
|
|
|
# depends_on:
|
|
|
|
# - rabbitmq
|
|
|
|
# - db
|
|
|
|
# - app
|
|
|
|
# - redis
|
|
|
|
#
|
|
|
|
# volumes:
|
|
|
|
# - .:/usr/src/fastfood
|
|
|
|
#
|
|
|
|
# command: ["celery", "-A", "bg_tasks.bg_task:celery_app", "beat", "--loglevel=info"]
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# rabbitmq:
|
|
|
|
# container_name: rabbit
|
|
|
|
#
|
|
|
|
# image: "rabbitmq:management"
|
|
|
|
#
|
|
|
|
# ports:
|
|
|
|
# - 5672:5672
|