-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
149 lines (142 loc) · 3.5 KB
/
docker-compose.yml
File metadata and controls
149 lines (142 loc) · 3.5 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
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile.dev
container_name: fkmtime-dev-backend
volumes:
- ./backend/src:/app/src
- ./backend/prisma:/app/prisma
- sock:/app/sock
restart: unless-stopped
dns:
- 8.8.8.8
- 8.8.4.4
- 1.1.1.1
environment:
- DATABASE_URL=postgres://root:password@database:5432/fkm_time
- WCA_LIVE_API_ORIGIN=http://dummy_wca_live:4000/api
- CUBING_CONTESTS_API_ORIGIN=http://api_tester:5001/api
- WCA_ORIGIN=http://dummy_wca:3000
- WCA_CLIENT_ID=example-application-id
- WCA_CLIENT_SECRET=example-secret
- SOCKET_PATH=/app/sock/socket.sock
ports:
- "5000:5000"
depends_on:
database:
condition: service_healthy
healthcheck:
test: [ "CMD-SHELL", "curl -f http://localhost:5000/health || exit 1"]
interval: 5s
timeout: 20s
retries: 50
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.dev
container_name: fkmtime-dev-frontend
environment:
- VITE_WCA_ORIGIN=http://127.0.0.1:3005
- VITE_GIT_COMMIT=dummy-commit
volumes:
- ./frontend/src:/app/src
- ./frontend/index.html:/app/index.html
ports:
- "5173:5173"
restart: unless-stopped
dns:
- 8.8.8.8
- 8.8.4.4
- 1.1.1.1
database:
image: postgres:18-alpine
container_name: fkmtime-dev-database
ports:
- "5433:5432"
restart: unless-stopped
dns:
- 8.8.8.8
- 8.8.4.4
- 1.1.1.1
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=password
- POSTGRES_DB=fkm_time
volumes:
- dev_database:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -d postgres"]
interval: 5s
timeout: 20s
retries: 50
api_tester:
build:
context: ./backend/api-tester
dockerfile: Dockerfile.dev
container_name: fkmtime-dev-api-tester
# Feel free to change this if you are not using CubingContests
ports:
- "5002:5001"
environment:
- SOCKET_PATH=/app/sock/socket.sock
volumes:
- ./backend/api-tester/src:/app/src
- sock:/app/sock
restart: unless-stopped
dns:
- 8.8.8.8
- 8.8.4.4
- 1.1.1.1
depends_on:
backend:
condition: service_healthy
dummy_wca:
container_name: fkmtime-dev-dummy-wca
restart: unless-stopped
image: maxidragon/dummy-wca:main
dns:
- 8.8.8.8
- 8.8.4.4
- 1.1.1.1
# Feel free to change this if you are not using CubingContests
ports:
- "3005:3000"
dummy_wca_live:
container_name: fkmtime-dev-dummy-wca-live
restart: unless-stopped
image: maxidragon/dummy-wca-live:main
dns:
- 8.8.8.8
- 8.8.4.4
- 1.1.1.1
ports:
- "4000:4000"
micro_connector:
image: "ghcr.io/fkmtime/fkmtime-micro-connector:master"
container_name: micro-connector
network_mode: host
dns:
- 8.8.8.8
- 8.8.4.4
- 1.1.1.1
volumes:
- /run/dbus:/run/dbus:ro
- sock:/app/sock
- /tmp/fkm-build:/app/firmware
- /tmp/fkm-logs:/logs
environment:
- PORT=8080
- FIRMWARE_DIR=/app/firmware
- RUST_LOG=none,backend=debug
- SOCKET_PATH=/app/sock/socket.sock
- DEVICE_LOGS=/logs
restart: unless-stopped
extra_hosts:
- host.docker.internal:host-gateway
depends_on:
backend:
condition: service_healthy
volumes:
dev_database:
sock: