-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
108 lines (102 loc) · 2.83 KB
/
Copy pathdocker-compose.yml
File metadata and controls
108 lines (102 loc) · 2.83 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
# Local/dev dependencies: Postgres + Redis + DbGate.
# Run from repo root: make docker-up
# Schema is NOT auto-applied. After postgres is up: make migrate
# or: docker compose -f deploy/docker-compose.yml run --rm migrate
# Full stack (app + deps): make docker-up-stack
services:
postgres:
image: postgres:16
container_name: lowcode-postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
command: ["postgres", "-c", "shared_preload_libraries=pg_stat_statements"]
ports:
- "5432:5432"
volumes:
- pg-data:/var/lib/postgresql/data
# Creates empty lowcode_meta / lowcode_data only. Schema: make migrate.
- ../docker/postgres/init:/docker-entrypoint-initdb.d:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7
container_name: lowcode-redis
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
dbgate:
image: ccr.ccs.tencentyun.com/sola/dbgate:latest
container_name: lowcode-dbgate
ports:
- "3000:3000"
environment:
CONNECTIONS: meta,data,redis
LABEL_meta: lowcode_meta
SERVER_meta: postgres
USER_meta: postgres
PASSWORD_meta: postgres
PORT_meta: "5432"
DATABASE_meta: lowcode_meta
ENGINE_meta: postgres@dbgate-plugin-postgres
LABEL_data: lowcode_data
SERVER_data: postgres
USER_data: postgres
PASSWORD_data: postgres
PORT_data: "5432"
DATABASE_data: lowcode_data
ENGINE_data: postgres@dbgate-plugin-postgres
LABEL_redis: redis
SERVER_redis: redis
PORT_redis: "6379"
ENGINE_redis: redis@dbgate-plugin-redis
volumes:
- dbgate-data:/root/.dbgate
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
migrate:
profiles: [migrate]
build:
context: ..
dockerfile: deploy/Dockerfile
image: lowcode-database:latest
entrypoint: ["./migrate"]
environment:
META_DATABASE_URL: postgresql://postgres:postgres@postgres:5432/lowcode_meta
depends_on:
postgres:
condition: service_healthy
server:
profiles: [stack]
build:
context: ..
dockerfile: deploy/Dockerfile
image: lowcode-database:latest
container_name: lowcode-server
ports:
- "8080:8080"
environment:
META_DATABASE_URL: postgresql://postgres:postgres@postgres:5432/lowcode_meta
REDIS_URL: redis://redis:6379/0
CACHE_ENABLED: "true"
HTTP_ADDR: :8080
EVENT_BUS: redis
LOG_LEVEL: debug
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
pg-data:
dbgate-data: