-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
93 lines (89 loc) · 2.08 KB
/
Copy pathdocker-compose.yml
File metadata and controls
93 lines (89 loc) · 2.08 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
services:
api:
build:
context: .
dockerfile: Dockerfile
container_name: orchflow-api
restart: unless-stopped
env_file:
- .env
environment:
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
REDIS_URL: redis://:${REDIS_PASSWORD}@redis:6379/0
ports:
- "127.0.0.1:8000:8000"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
read_only: true
tmpfs:
- /tmp
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
mem_limit: 1g
cpus: 1.0
networks:
- orchflow_net
postgres:
image: postgres:17-alpine
container_name: orchflow-postgres
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U \"$${POSTGRES_USER}\" -d \"$${POSTGRES_DB}\""]
interval: 10s
timeout: 5s
retries: 10
security_opt:
- no-new-privileges:true
mem_limit: 768m
cpus: 1.0
networks:
- orchflow_net
redis:
image: redis:7-alpine
container_name: orchflow-redis
restart: unless-stopped
command:
- sh
- -c
- >
redis-server
--appendonly yes
--save 60 1000
--requirepass "$${REDIS_PASSWORD}"
--protected-mode yes
--bind 0.0.0.0
--rename-command FLUSHALL ""
--rename-command FLUSHDB ""
--rename-command CONFIG ""
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD}
volumes:
- redis_data:/data
healthcheck:
test: ["CMD-SHELL", "redis-cli -a \"$${REDIS_PASSWORD}\" ping | grep PONG"]
interval: 10s
timeout: 5s
retries: 10
security_opt:
- no-new-privileges:true
mem_limit: 256m
cpus: 0.5
networks:
- orchflow_net
volumes:
postgres_data:
redis_data:
networks:
orchflow_net:
driver: bridge