-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (53 loc) · 1.62 KB
/
docker-compose.yml
File metadata and controls
56 lines (53 loc) · 1.62 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
# Local development environment for GlideComp.
#
# Usage:
# docker compose up --build
#
# The frontend port defaults to 3000. Override it to run multiple
# worktrees side-by-side:
# PORT=3001 docker compose up --build
#
# Mapbox token is read from your .env file (VITE_MAPBOX_TOKEN).
# Worker secrets are read from their .dev.vars files in the volume mount.
services:
frontend:
build:
context: .
dockerfile: Dockerfile.dev
ports:
- "${PORT:-3000}:3000"
volumes:
- .:/app
- node_modules:/app/node_modules
env_file:
- .env
environment:
AUTH_API_URL: http://workers:8788
COMP_API_URL: http://workers:8789
AIRSCORE_API_URL: http://workers:8787
VITE_AIRSCORE_URL: /api/airscore
command: >
sh -c "bun install &&
cd web/frontend &&
exec bunx --bun vite --host 0.0.0.0 --port 3000"
# All four Cloudflare workers run in a single container so they share the
# same localhost — wrangler's dev registry (used to wire up service bindings
# like competition-api → auth-api) is localhost-only and won't span
# containers. Each wrangler dev runs in its own working directory so it
# picks up its own wrangler.toml and ignores the Pages config at the repo
# root.
workers:
build:
context: .
dockerfile: Dockerfile.dev
ports:
- "8787:8787" # airscore-api
- "8788:8788" # auth-api
- "8789:8789" # competition-api
- "8790:8790" # mcp-api
volumes:
- .:/app
- node_modules:/app/node_modules
command: ["sh", "web/scripts/docker-dev-workers.sh"]
volumes:
node_modules: