Repository navigation
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
189 lines (181 loc) · 4.68 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
189 lines (181 loc) · 4.68 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
name: clean-stack
services:
postgres:
image: postgres:18-alpine
container_name: clean-stack-postgres
restart: unless-stopped
ports:
- "5433:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: clean_stack
volumes:
- postgres_data:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
seaweedfs:
image: chrislusf/seaweedfs:latest
container_name: clean-stack-seaweedfs
restart: unless-stopped
command: server -s3 -dir=/data
ports:
- "8333:8333"
volumes:
- seaweedfs_data:/data
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1:8333/"]
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
profiles: ["storage"]
seaweedfs-init:
image: chrislusf/seaweedfs:latest
container_name: clean-stack-seaweedfs-init
depends_on:
seaweedfs:
condition: service_healthy
entrypoint: ["/bin/sh", "-c"]
command:
- echo 's3.bucket.create -name clean-stack' | weed shell
-master=seaweedfs:9333
profiles: ["storage"]
keycloak:
image: quay.io/keycloak/keycloak:26.8.1
container_name: clean-stack-keycloak
command: start-dev --http-port=8080
environment:
KC_BOOTSTRAP_ADMIN_USERNAME: admin
KC_BOOTSTRAP_ADMIN_PASSWORD: admin
ports:
- "8080:8080"
healthcheck:
test: ["CMD-SHELL", "exec 3<>/dev/tcp/127.0.0.1/8080"]
interval: 5s
timeout: 5s
retries: 10
start_period: 20s
profiles: ["sso"]
api:
build:
context: .
dockerfile: apps/api/dev.Dockerfile
container_name: clean-stack-api-dev
ports:
- "3000:3000"
env_file:
- apps/api/.env
environment:
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/clean_stack
S3_ENDPOINT: http://seaweedfs:8333
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3000/livez"]
interval: 30s
timeout: 3s
start_period: 20s
retries: 5
develop:
watch:
- action: sync
path: ./apps/api/src
target: /repo/apps/api/src
- action: sync
path: ./packages
target: /repo/packages
ignore:
- node_modules/
- dist/
- action: sync
path: ./modules
target: /repo/modules
ignore:
- node_modules/
- dist/
- action: rebuild
path: ./pnpm-lock.yaml
- action: rebuild
path: ./turbo.json
- action: rebuild
path: ./pnpm-workspace.yaml
- action: rebuild
path: ./apps/api/package.json
app:
build:
context: .
dockerfile: apps/app/dev.Dockerfile
container_name: clean-stack-app-dev
ports:
- "5173:5173"
environment:
VITE_API_URL: http://localhost:3000
VITE_ADMIN_URL: http://localhost:5174
depends_on:
api:
condition: service_healthy
develop:
watch:
- action: sync
path: ./apps/app/src
target: /repo/apps/app/src
- action: sync
path: ./apps/app/index.html
target: /repo/apps/app/index.html
- action: sync
path: ./packages
target: /repo/packages
ignore:
- node_modules/
- dist/
- action: rebuild
path: ./pnpm-lock.yaml
- action: rebuild
path: ./turbo.json
- action: rebuild
path: ./pnpm-workspace.yaml
- action: rebuild
path: ./apps/app/package.json
admin:
build:
context: .
dockerfile: apps/admin/dev.Dockerfile
container_name: clean-stack-admin-dev
ports:
- "5174:5174"
environment:
VITE_API_URL: http://localhost:3000
VITE_APP_URL: http://localhost:5173
depends_on:
api:
condition: service_healthy
develop:
watch:
- action: sync
path: ./apps/admin/src
target: /repo/apps/admin/src
- action: sync
path: ./apps/admin/index.html
target: /repo/apps/admin/index.html
- action: sync
path: ./packages
target: /repo/packages
ignore:
- node_modules/
- dist/
- action: rebuild
path: ./pnpm-lock.yaml
- action: rebuild
path: ./turbo.json
- action: rebuild
path: ./pnpm-workspace.yaml
- action: rebuild
path: ./apps/admin/package.json
volumes:
postgres_data:
seaweedfs_data: