-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
76 lines (71 loc) · 1.91 KB
/
Copy pathdocker-compose.yml
File metadata and controls
76 lines (71 loc) · 1.91 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
services:
# PostgreSQL Database (port 5432)
db:
image: postgres:17
ports:
- "5432:5432"
environment:
- POSTGRES_USER=gateway
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=gateway
volumes:
- postgres_data:/var/lib/postgresql/data
- ./database:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD-SHELL", "pg_isready -U gateway -d gateway"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
# Go Backend — Hot-reloading via air (port 10101)
gateway:
build:
context: .
dockerfile: Dockerfile.dev
ports:
- "10101:10101"
environment:
- APP_ENVIRONMENT=local
- CONFIG_PATH=configs/local.example.yml
- DATABASE_URL=postgres://gateway:secret@db:5432/gateway?sslmode=disable
- GOWORK=off
- MESSAGE_JWT_SECRET=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
- MESSAGE_CONFIG_ENCRYPTION_KEY=0123456789abcdef0123456789abcdef
- MESSAGE_PORTAL_BASE_URL=http://localhost:10104
volumes:
- .:/app
working_dir: /app
depends_on:
db:
condition: service_healthy
restart: unless-stopped
# Portal UI — React Vite app (port 10104)
portal-ui:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "10104:10104"
environment:
- API_TARGET=http://gateway:10101
- CHOKIDAR_USEPOLLING=true # Better file watching in Docker
volumes:
- ./frontend:/app
- /app/node_modules
depends_on:
- gateway
restart: unless-stopped
# Storybook — Component isolation dev server (port 6006)
storybook:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "6006:6006"
volumes:
- ./frontend:/app
- /app/node_modules
command: ["npm", "run", "storybook", "--", "--host", "0.0.0.0"]
restart: unless-stopped
volumes:
postgres_data: