Repository navigation
Expand file tree
/
Copy pathcompose.dev.yaml
More file actions
76 lines (72 loc) · 2.19 KB
/
Copy pathcompose.dev.yaml
File metadata and controls
76 lines (72 loc) · 2.19 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
# Full stack with hot reload. Run with:
# docker compose -f compose.yaml -f compose.dev.yaml watch
# then browse http://localhost (HTTP_PORT). File changes are synced into the
# containers by `compose watch`, so vite HMR and `bun --watch` fire normally
# even though the checkout lives on a 9p mount (bind mounts don't deliver
# inotify there).
services:
proxy:
volumes:
- ./proxy/nginx.dev.conf:/etc/nginx/conf.d/default.conf:ro
sqlserver:
ports:
- 5174:1433
postgres:
ports:
- 5175:5432
leaderboard-db:
ports:
- 6000:5432
# Dev seed so /admin has players, stuck lists, awards and solutions to look
# at. initdb runs it once on an empty volume, so recreate to reseed:
# docker compose down -v && docker compose -f compose.yaml -f compose.dev.yaml watch
volumes:
- ./sql-data/game-dev-seed.sql:/docker-entrypoint-initdb.d/zz-dev-seed.sql
front-end:
command: bun run dev
environment:
VITE_PORT: 3000
VITE_HMR_CLIENT_PORT: 3000
ports:
- 3000:3000
develop:
watch:
- path: ./sql-front/src
action: sync
target: /usr/src/app/src
- path: ./sql-front/public
action: sync
target: /usr/src/app/public
- path: ./sql-front/index.html
action: sync
target: /usr/src/app/index.html
- path: ./sql-front/package.json
action: rebuild
back-end:
command: bun run dev
develop:
watch:
- path: ./sql-back/src
action: sync
target: /usr/src/app/src
- path: ./sql-back/package.json
action: rebuild
# Slidev's dev server serves at the root and its --remote sync state breaks
# under a --base prefix, so the deck runs on :3030 and the dev proxy redirects
# /slides/ there (see nginx.dev.conf) rather than reverse-proxying it.
slides:
build:
target: build
command: bunx slidev --port 3030 --remote
ports:
- 3030:3030
develop:
watch:
- path: ./slides
action: sync
target: /usr/src/app
ignore:
- node_modules/
- dist/
- path: ./slides/package.json
action: rebuild