-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.local.yaml
More file actions
55 lines (50 loc) · 1.06 KB
/
docker-compose.local.yaml
File metadata and controls
55 lines (50 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
version: "3.8"
services:
banners_app:
container_name: banners_app
build:
context: .
dockerfile: Dockerfile
ports:
- "8003:8003"
command: "sh -c 'alembic upgrade head && python init.db.py && uvicorn --factory application.main:create_app --reload --host 0.0.0.0 --port 8003'"
env_file:
- app/.env
depends_on:
postgres:
condition: service_healthy
volumes:
- ./app/:/app/
networks:
- custom
postgres:
image: postgres:16-bookworm
container_name: postgres
ports:
- "5432:5432"
env_file:
- app/.env
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 5s
timeout: 3s
retries: 5
networks:
- custom
volumes:
- db-data:/var/lib/postgresql/data
- ./create-db.sql:/docker-entrypoint-initdb.d/create-db.sql
redis:
container_name: redis
image: redis:7.2.4-bookworm
ports:
- "6379:6379"
env_file:
- app/.env
networks:
- custom
volumes:
db-data:
networks:
custom:
driver: bridge