forked from openclaw/clawhub
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
69 lines (66 loc) · 2.07 KB
/
Copy pathdocker-compose.yml
File metadata and controls
69 lines (66 loc) · 2.07 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
services:
postgres:
image: ${POSTGRES_IMAGE:-postgres:16-alpine}
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-clawhub}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
ports:
- '${POSTGRES_HOST_PORT:-5432}:5432'
volumes:
- postgres-data:/var/lib/postgresql/data
- ./backend/data/docker-init.sql:/docker-entrypoint-initdb.d/01-docker-init.sql:ro
- ./backend/data/schema.sql:/docker-entrypoint-initdb.d/02-schema.sql:ro
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-clawhub}']
interval: 5s
timeout: 5s
retries: 20
backend:
build:
context: .
dockerfile: backend/Dockerfile
args:
GO_IMAGE: ${GO_IMAGE:-golang:1.25-alpine}
ALPINE_IMAGE: ${ALPINE_IMAGE:-alpine:3.22}
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
GO_ENV: local
PORT: ${BACKEND_PORT:-8080}
DATABASE_URL: postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:5432/${POSTGRES_DB:-clawhub}?sslmode=disable
JWT_SECRET: change-me
OSS_ENDPOINT: ''
OSS_BUCKET: ''
OSS_REGION: ''
OSS_ACCESS_KEY_ID: ''
OSS_ACCESS_KEY_SECRET: ''
FRONTEND_URL: http://localhost:${FRONTEND_HOST_PORT:-10091}
ports:
- '${BACKEND_HOST_PORT:-10081}:${BACKEND_PORT:-8080}'
frontend:
build:
context: .
dockerfile: Dockerfile.frontend
args:
BUN_IMAGE: ${BUN_IMAGE:-oven/bun:1.3.6}
NPM_REGISTRY: ${NPM_REGISTRY:-https://registry.npmjs.org}
restart: unless-stopped
depends_on:
backend:
condition: service_started
environment:
NODE_ENV: production
PORT: 3000
HOST: 0.0.0.0
BACKEND_URL: http://backend:${BACKEND_PORT:-8080}
VITE_SITE_URL: http://localhost:10091
VITE_API_BASE: /api/v1
VITE_BACKEND_BASE: ''
ports:
- '${FRONTEND_HOST_PORT:-10091}:3000'
volumes:
postgres-data: