-
Notifications
You must be signed in to change notification settings - Fork 156
Expand file tree
/
Copy pathdocker-compose.external.yml
More file actions
66 lines (57 loc) · 2.04 KB
/
Copy pathdocker-compose.external.yml
File metadata and controls
66 lines (57 loc) · 2.04 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
# docker-compose.external.yml — Opt-in external binding override
#
# By default, docker-compose.yml binds all services to 127.0.0.1 (loopback only).
# This keeps the dev stack secure on shared networks: a developer running `make dev`
# in a café cannot inadvertently expose Postgres or Redis with known credentials.
#
# To expose services on all network interfaces (0.0.0.0), compose this file on top:
#
# docker compose -f docker-compose.yml -f docker-compose.external.yml up
#
# This is useful for:
# - Multi-machine setups where the API runs in a container accessed from another host
# - CI/CD pipelines that need network access from outside the container
#
# SECURITY WARNING: Binding to 0.0.0.0 exposes services to your network with
# development credentials (postgres:nester_dev_password, redis with no auth).
# Only use this on trusted networks. Never on public WiFi.
#
# See docs/security/dev-setup.md for more.
services:
redis:
ports: !override
- "0.0.0.0:6379:6379"
postgres:
ports: !override
- "0.0.0.0:5432:5432"
api:
ports: !override
- "0.0.0.0:8080:8080"
frontend:
ports: !override
- "0.0.0.0:3001:3001"
# !override replaces the base service's environment wholesale rather than
# merging into it, so every key the base sets has to be repeated here.
# NEXT_PUBLIC_NETWORK was dropped, and the /api/v1 and /ws suffixes were
# lost, which broke API routing under `make dev-external`.
environment: !override
NEXT_PUBLIC_API_URL: "http://${EXTERNAL_HOSTNAME:-localhost}:8080/api/v1"
NEXT_PUBLIC_WS_URL: "ws://${EXTERNAL_HOSTNAME:-localhost}:8080/ws"
NEXT_PUBLIC_NETWORK: testnet
ALLOWED_ORIGINS: "${EXTERNAL_HOSTNAME:-localhost}"
jaeger:
ports: !override
- "0.0.0.0:16686:16686"
otel-collector:
ports: !override
- "0.0.0.0:4317:4317"
- "0.0.0.0:4318:4318"
prometheus:
ports: !override
- "0.0.0.0:9091:9090"
alertmanager:
ports: !override
- "0.0.0.0:9093:9093"
grafana:
ports: !override
- "0.0.0.0:3002:3000"