2024-01-30 23:11:40 +03:00
|
|
|
version: "3.8"
|
|
|
|
services:
|
2024-02-05 19:13:40 +03:00
|
|
|
redis:
|
|
|
|
container_name: redis_test
|
|
|
|
|
|
|
|
image: redis:7.2.4-alpine3.19
|
|
|
|
|
|
|
|
ports:
|
|
|
|
- '6380:6379'
|
|
|
|
|
|
|
|
healthcheck:
|
|
|
|
test: [ "CMD", "redis-cli","ping" ]
|
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 5
|
|
|
|
|
2024-01-30 23:11:40 +03:00
|
|
|
db:
|
|
|
|
container_name: pgdb
|
2024-02-03 01:08:04 +03:00
|
|
|
|
2024-01-30 23:11:40 +03:00
|
|
|
image: postgres:15.1-alpine
|
2024-02-03 01:08:04 +03:00
|
|
|
|
2024-01-30 23:11:40 +03:00
|
|
|
env_file:
|
|
|
|
- .env
|
2024-02-03 01:08:04 +03:00
|
|
|
|
2024-01-30 23:11:40 +03:00
|
|
|
environment:
|
|
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
2024-02-03 01:08:04 +03:00
|
|
|
|
2024-01-30 23:11:40 +03:00
|
|
|
ports:
|
|
|
|
- 6432:5432
|
2024-02-03 01:08:04 +03:00
|
|
|
|
2024-01-30 23:11:40 +03:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 5
|
|
|
|
|
2024-02-03 01:08:04 +03:00
|
|
|
|
2024-01-30 23:11:40 +03:00
|
|
|
app:
|
|
|
|
container_name: fastfood_app
|
2024-02-03 01:08:04 +03:00
|
|
|
|
2024-01-30 23:11:40 +03:00
|
|
|
build:
|
|
|
|
context: .
|
2024-02-03 01:08:04 +03:00
|
|
|
|
2024-01-30 23:11:40 +03:00
|
|
|
env_file:
|
|
|
|
- .env
|
2024-02-03 01:08:04 +03:00
|
|
|
|
2024-01-30 23:11:40 +03:00
|
|
|
ports:
|
|
|
|
- 8000:8000
|
2024-02-03 01:08:04 +03:00
|
|
|
|
2024-01-30 23:11:40 +03:00
|
|
|
depends_on:
|
|
|
|
db:
|
|
|
|
condition: service_healthy
|
2024-02-05 19:13:40 +03:00
|
|
|
redis:
|
|
|
|
condition: service_healthy
|
2024-02-03 01:08:04 +03:00
|
|
|
|
2024-01-30 23:11:40 +03:00
|
|
|
restart: always
|
|
|
|
|
2024-02-12 00:39:51 +03:00
|
|
|
volumes:
|
|
|
|
- .:/usr/src/fastfood
|
|
|
|
|
2024-01-30 23:11:40 +03:00
|
|
|
command: /bin/bash -c 'poetry run python /usr/src/fastfood/manage.py --run-test-server'
|
2024-02-12 00:39:51 +03:00
|
|
|
|
|
|
|
celery:
|
|
|
|
container_name: celery
|
|
|
|
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
|
|
|
|
env_file:
|
|
|
|
- .env
|
|
|
|
|
|
|
|
depends_on:
|
|
|
|
- rabbitmq
|
|
|
|
- db
|
|
|
|
- app
|
|
|
|
- redis
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- .:/usr/src/fastfood
|
|
|
|
|
|
|
|
command: /bin/bash -c 'poetry run python /usr/src/fastfood/manage.py --run-selery'
|
|
|
|
|
|
|
|
rabbitmq:
|
|
|
|
container_name: rabbit
|
|
|
|
|
|
|
|
image: "rabbitmq:management"
|
|
|
|
|
|
|
|
ports:
|
|
|
|
- 5672:5672
|