-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
177 lines (171 loc) · 3.96 KB
/
docker-compose.yml
File metadata and controls
177 lines (171 loc) · 3.96 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
services:
postgres:
image: postgres:18-alpine
container_name: base0-postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: base0
POSTGRES_INITDB_ARGS: "-E UTF8 --locale=C"
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- base0-network
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d base0 || exit 1"]
interval: 15s
timeout: 10s
retries: 5
start_period: 40s
deploy:
resources:
limits:
cpus: '1'
memory: 512M
reservations:
cpus: '0.5'
memory: 256M
logging:
driver: 'json-file'
options:
max-size: '50m'
max-file: '3'
labels: 'service=postgres'
minio:
image: minio/minio:latest
container_name: base0-minio
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
volumes:
- minio_data:/data
networks:
- base0-network
restart: unless-stopped
command: server /data --console-address ":9001"
healthcheck:
test: ["CMD-SHELL", "curl -s -f http://localhost:9000/minio/health/live || exit 1"]
interval: 20s
timeout: 10s
retries: 3
start_period: 40s
deploy:
resources:
limits:
cpus: '1'
memory: 1G
reservations:
cpus: '0.5'
memory: 512M
logging:
driver: 'json-file'
options:
max-size: '50m'
max-file: '3'
labels: 'service=minio'
# Base0 API Service
api:
build:
context: .
dockerfile: apps/api/Dockerfile
container_name: base0-api
environment:
NODE_ENV: development
PORT: 3001
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/base0
JWT_SECRET: your-secret-key-change-in-production
JWT_EXPIRES_IN: 7d
ALLOWED_ORIGINS: http://localhost:3000
STORAGE_DRIVER: local
S3_ENDPOINT: http://minio:9000
S3_REGION: us-east-1
S3_ACCESS_KEY_ID: minioadmin
S3_SECRET_ACCESS_KEY: minioadmin
S3_BUCKET: base0
S3_FORCE_PATH_STYLE: "true"
GITHUB_CLIENT_ID: ""
GITHUB_CLIENT_SECRET: ""
RATE_LIMIT_MAX: 100
ports:
- "3001:3001"
networks:
- base0-network
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
minio:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3001/health"]
interval: 15s
timeout: 5s
retries: 5
start_period: 60s
deploy:
resources:
limits:
cpus: '1'
memory: 1G
reservations:
cpus: '0.5'
memory: 512M
logging:
driver: 'json-file'
options:
max-size: '100m'
max-file: '5'
labels: 'service=api'
# Base0 Dashboard (Frontend)
dashboard:
build:
context: .
dockerfile: apps/dashboard/Dockerfile
container_name: base0-dashboard
environment:
NODE_ENV: development
VITE_API_URL: http://localhost:3001
ports:
- "3000:3000"
networks:
- base0-network
restart: unless-stopped
depends_on:
api:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 15s
timeout: 5s
retries: 5
start_period: 60s
deploy:
resources:
limits:
cpus: '0.5'
memory: 512M
reservations:
cpus: '0.25'
memory: 256M
logging:
driver: 'json-file'
options:
max-size: '50m'
max-file: '3'
labels: 'service=dashboard'
networks:
base0-network:
driver: bridge
volumes:
postgres_data:
driver: local
minio_data:
driver: local
uploads_data:
driver: local