-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
41 lines (38 loc) · 956 Bytes
/
docker-compose.yml
File metadata and controls
41 lines (38 loc) · 956 Bytes
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
name: onier-stack
services:
api:
build:
context: .
dockerfile: Dockerfile
container_name: onier-api
environment:
TZ: Asia/Seoul
REDIS_URL: redis://default:${REDIS_PASSWORD:-change_me}@redis:6379/0
ports:
- "8000:8000"
depends_on:
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:8000/health"]
interval: 10s
timeout: 3s
retries: 5
restart: unless-stopped
networks: [backend]
redis:
image: redis:7.2-alpine
container_name: onier-redis
command: ["redis-server", "--requirepass", "${REDIS_PASSWORD:-change_me}"]
healthcheck:
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD:-change_me}", "PING"]
interval: 5s
timeout: 3s
retries: 10
volumes:
- ./data/redis:/data
restart: unless-stopped
networks: [backend]
networks:
backend:
driver: bridge