forked from TheSmallHanCat/flow2api
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.local.yml
More file actions
59 lines (55 loc) · 1.61 KB
/
Copy pathdocker-compose.local.yml
File metadata and controls
59 lines (55 loc) · 1.61 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
version: '3.8'
services:
flow2api:
build:
context: .
dockerfile: Dockerfile
image: flow2api-local:latest
container_name: flow2api-local
ports:
- "38000:8000"
volumes:
- ./data:/app/data
- ./tmp:/app/tmp
- ./config/setting.toml:/app/config/setting.toml
environment:
- PYTHONUNBUFFERED=1
- FLOW2API_API_ONLY_HOST=${FLOW2API_API_ONLY_HOST:-}
- FLOW2API_DB_URL=${FLOW2API_DB_URL:-postgresql://flow2api:flow2api@postgres:5432/flow2api}
- FLOW2API_REDIS_URL=${FLOW2API_REDIS_URL:-redis://redis:6379/0}
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
postgres:
image: postgres:16-alpine
container_name: flow2api-local-postgres
environment:
- POSTGRES_USER=${POSTGRES_USER:-flow2api}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-flow2api}
- POSTGRES_DB=${POSTGRES_DB:-flow2api}
volumes:
- flow2api-local-postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-flow2api} -d ${POSTGRES_DB:-flow2api}"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
redis:
image: redis:7-alpine
container_name: flow2api-local-redis
command: ["redis-server", "--appendonly", "yes"]
volumes:
- flow2api-local-redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
flow2api-local-postgres-data:
flow2api-local-redis-data: