-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
134 lines (126 loc) · 3.12 KB
/
docker-compose.dev.yml
File metadata and controls
134 lines (126 loc) · 3.12 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: api-forge-dev
services:
keycloak:
container_name: api-forge-keycloak-dev
extends:
file: infra/docker/dev/keycloak/docker-compose.yml
service: keycloak
keycloak-setup:
container_name: api-forge-keycloak-setup-dev
image: python:3.11-slim
depends_on:
keycloak:
condition: service_healthy
environment:
- KEYCLOAK_URL=http://keycloak:8080
volumes:
- ./src/dev:/app/src/dev
- ./infra/docker/dev/keycloak/setup_script.py:/app/setup_script.py
working_dir: /app
command: >
sh -c "
pip install requests &&
python setup_script.py
"
networks:
- dev-network
restart: "no"
postgres:
container_name: api-forge-postgres-dev
extends:
file: infra/docker/dev/postgres/docker-compose.yml
service: postgres
environment:
POSTGRES_PASSWORD: devpass
APP_DB: ${APP_DB:-appdb}
APP_DB_USER: ${APP_DB_USER:-appuser}
APP_DB_USER_PW: devpass
redis:
container_name: api-forge-redis-dev
extends:
file: infra/docker/dev/redis/docker-compose.yml
service: redis
temporal:
container_name: api-forge-temporal-dev
image: temporalio/auto-setup:1.28.1
depends_on:
- postgres
environment:
- DB=postgres12
- DB_PORT=5432
- POSTGRES_USER=postgres
- POSTGRES_PWD=devpass
- POSTGRES_SEEDS=postgres
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CLI_ADDRESS=temporal:7233
networks:
- dev-network
ports:
- 7234:7233
healthcheck:
test: ["CMD", "tctl", "--address", "temporal:7233", "cluster", "health"]
interval: 5s
timeout: 5s
retries: 10
start_period: 30s
temporal-web:
container_name: api-forge-temporal-ui-dev
image: temporalio/ui:2.34.0
depends_on:
- temporal
environment:
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CORS_ORIGINS=http://localhost:3000
networks:
- dev-network
ports:
- 8082:8080
worker:
container_name: api-forge-worker-dev
build:
context: .
dockerfile: Dockerfile
image: api-forge-app:latest
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
temporal:
condition: service_healthy
env_file:
- .env
environment:
- APP_ENVIRONMENT=development
- LOG_LEVEL=DEBUG
- LOG_FORMAT=json
- PYTHONPATH=/app
- DEVELOPMENT_TEMPORAL_URL=temporal:7233
volumes:
- ./config.yaml:/app/config.yaml:ro
- ./src:/app/src:ro
- /etc/localtime:/etc/localtime:ro
networks:
- dev-network
command: ["python", "-m", "src.worker.main", "--log-level", "DEBUG"]
healthcheck:
test: ["CMD", "python", "/app/src/worker/health_check.py"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
restart: unless-stopped
volumes:
keycloak_data:
driver: local
postgres_data_dev:
driver: local
redis_data:
driver: local
temporal_postgres_data:
driver: local
temporal_data:
driver: local
networks:
dev-network:
driver: bridge