-
-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
195 lines (189 loc) · 6.08 KB
/
docker-compose.dev.yml
File metadata and controls
195 lines (189 loc) · 6.08 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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
services:
tileserver:
image: maptiler/tileserver-gl-light:latest
container_name: tileserver
ports:
- "8082:8080"
restart: unless-stopped
volumes:
- ./tiles:/data
environment:
- TZ=America/New_York
# PostgreSQL service for testing dual-database support
# Start with: docker compose -f docker-compose.dev.yml --profile postgres up -d
postgres:
image: postgres:16-alpine
container_name: meshmonitor-postgres
profiles:
- postgres
ports:
- "5432:5432"
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=meshmonitor
- POSTGRES_USER=meshmonitor
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-meshmonitor_dev}
- TZ=America/New_York
healthcheck:
test: ["CMD-SHELL", "pg_isready -U meshmonitor -d meshmonitor"]
interval: 10s
timeout: 5s
retries: 5
meshmonitor:
build:
context: .
dockerfile: Dockerfile
# Enable BuildKit cache for faster rebuilds
cache_from:
- meshmonitor:latest
# Use inline cache to persist across builds
args:
BUILDKIT_INLINE_CACHE: 1
container_name: meshmonitor
profiles:
- postgres
depends_on:
postgres:
condition: service_healthy
ports:
- "8081:3001" # Changed to 8081 to avoid conflict with devcontainer
- "4405:4404" # Virtual Node Server on unique external port
restart: unless-stopped
volumes:
- meshmonitor-data:/data
# - ./meshmonitor-logs:/data/logs:rw # Commented out for local dev - logs still written to /data/logs in container
env_file: .env
environment:
- NODE_ENV=production
# SQLite (default): - DATABASE_PATH=/data/meshmonitor.db
# PostgreSQL: Enabled for testing
- DATABASE_URL=postgres://meshmonitor:meshmonitor_dev@postgres:5432/meshmonitor
- SESSION_SECRET=qlskjerhqlwkjehrlqkwejh
- BASE_URL=/meshmonitor
- TZ=America/New_York
- ALLOWED_ORIGINS=http://localhost:8081,http://localhost:8080,http://sentry.yeraze.online:8081,https://meshdev.yeraze.online
- TRUST_PROXY=1
- COOKIE_SECURE=false
- DISABLE_ANONYMOUS=${DISABLE_ANONYMOUS:-false}
- OIDC_ISSUER=${OIDC_ISSUER:-}
- OIDC_CLIENT_ID=${OIDC_CLIENT_ID:-}
- OIDC_CLIENT_SECRET=${OIDC_CLIENT_SECRET:-}
- OIDC_ALLOW_HTTP=${OIDC_ALLOW_HTTP:-false}
- ACCESS_LOG_ENABLED=true
- ACCESS_LOG_PATH=/data/logs/access.log
- ACCESS_LOG_FORMAT=combined
- ENABLE_VIRTUAL_NODE=${ENABLE_VIRTUAL_NODE:-true} # Re-enabled on port 4405
- VIRTUAL_NODE_PORT=${VIRTUAL_NODE_PORT:-4404}
# SQLite service (default database)
# Start with: docker compose -f docker-compose.dev.yml --profile sqlite up -d
meshmonitor-sqlite:
build:
context: .
dockerfile: Dockerfile
cache_from:
- meshmonitor:latest
args:
BUILDKIT_INLINE_CACHE: 1
container_name: meshmonitor-sqlite
profiles:
- sqlite
ports:
- "8081:3001"
- "4405:4404"
restart: unless-stopped
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- meshmonitor-sqlite-data:/data
env_file: .env
environment:
- NODE_ENV=production
# SQLite is the default - no DATABASE_URL needed
- DATABASE_PATH=/data/meshmonitor.db
- SESSION_SECRET=qlskjerhqlwkjehrlqkwejh
- BASE_URL=/meshmonitor
- TZ=America/New_York
- ALLOWED_ORIGINS=http://localhost:8081,http://localhost:8080,http://sentry.yeraze.online:8081,https://meshdev.yeraze.online
- TRUST_PROXY=1
- COOKIE_SECURE=false
- DISABLE_ANONYMOUS=${DISABLE_ANONYMOUS:-false}
- ACCESS_LOG_ENABLED=true
- ACCESS_LOG_PATH=/data/logs/access.log
- ACCESS_LOG_FORMAT=combined
- ENABLE_VIRTUAL_NODE=${ENABLE_VIRTUAL_NODE:-true}
- VIRTUAL_NODE_PORT=${VIRTUAL_NODE_PORT:-4404}
- VIRTUAL_NODE_ALLOW_ADMIN_COMMANDS=${VIRTUAL_NODE_ALLOW_ADMIN_COMMANDS:-true}
# News feed URL for testing - use host.docker.internal to access host machine
- NEWS_FEED_URL=${NEWS_FEED_URL:-}
# MySQL service for testing dual-database support
# Start with: docker compose -f docker-compose.dev.yml --profile mysql up -d
mysql:
image: mysql:8
container_name: meshmonitor-mysql
profiles:
- mysql
ports:
- "3307:3306"
restart: unless-stopped
volumes:
- mysql-data:/var/lib/mysql
environment:
- MYSQL_DATABASE=meshmonitor
- MYSQL_USER=meshmonitor
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-meshmonitor_dev}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-root_dev}
- TZ=America/New_York
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
meshmonitor-mysql:
build:
context: .
dockerfile: Dockerfile
cache_from:
- meshmonitor:latest
args:
BUILDKIT_INLINE_CACHE: 1
container_name: meshmonitor-mysql-app
profiles:
- mysql
depends_on:
mysql:
condition: service_healthy
ports:
- "8081:3001"
- "4405:4404"
restart: unless-stopped
volumes:
- meshmonitor-mysql-data:/data
env_file: .env
environment:
- NODE_ENV=production
- DATABASE_URL=mysql://meshmonitor:meshmonitor_dev@mysql:3306/meshmonitor
- SESSION_SECRET=qlskjerhqlwkjehrlqkwejh
- BASE_URL=/meshmonitor
- TZ=America/New_York
- ALLOWED_ORIGINS=http://localhost:8081,http://localhost:8080,http://sentry.yeraze.online:8081,https://meshdev.yeraze.online
- TRUST_PROXY=1
- COOKIE_SECURE=false
- DISABLE_ANONYMOUS=${DISABLE_ANONYMOUS:-false}
- ACCESS_LOG_ENABLED=true
- ACCESS_LOG_PATH=/data/logs/access.log
- ACCESS_LOG_FORMAT=combined
- ENABLE_VIRTUAL_NODE=${ENABLE_VIRTUAL_NODE:-true}
- VIRTUAL_NODE_PORT=${VIRTUAL_NODE_PORT:-4404}
volumes:
meshmonitor-data:
driver: local
meshmonitor-sqlite-data:
driver: local
postgres-data:
driver: local
mysql-data:
driver: local
meshmonitor-mysql-data:
driver: local