mirror of
https://github.com/dpup/meshstream.git
synced 2026-03-28 17:42:37 +01:00
Fix paths for docker deployment
This commit is contained in:
17
Dockerfile
17
Dockerfile
@@ -31,15 +31,14 @@ ENV VITE_API_BASE_URL=${MESHSTREAM_API_BASE_URL} \
|
||||
VITE_SITE_TITLE=${MESHSTREAM_SITE_TITLE} \
|
||||
VITE_SITE_DESCRIPTION=${MESHSTREAM_SITE_DESCRIPTION}
|
||||
|
||||
# esbuild's bundled Go binary crashes on kernels with 5-level paging or
|
||||
# high-entropy ASLR because Go's lfstack can't handle addresses above 47 bits.
|
||||
# setarch --addr-no-randomize disables ASLR for the process via the personality
|
||||
# syscall, keeping allocations at low addresses. util-linux provides setarch.
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends util-linux \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
# esbuild's bundled Go binary crashes on kernels with 5-level paging / high-entropy
|
||||
# ASLR because Go's GC (gcStart → finishsweep_m → lfstack.push) can't handle
|
||||
# addresses above 47 bits. Disabling the GC entirely prevents the crash; memory
|
||||
# growth in a short-lived build process is not a problem.
|
||||
ENV GOGC=off
|
||||
|
||||
# Build the web app
|
||||
RUN setarch "$(uname -m)" --addr-no-randomize pnpm build
|
||||
RUN pnpm build
|
||||
|
||||
###############################################################################
|
||||
# Stage 2: Build the Go server
|
||||
@@ -96,11 +95,11 @@ RUN chown -R meshstream:meshstream /app
|
||||
USER meshstream
|
||||
|
||||
# Expose the application port
|
||||
EXPOSE 5446
|
||||
EXPOSE 8080
|
||||
|
||||
# Server configuration
|
||||
ENV MESHSTREAM_SERVER_HOST=0.0.0.0
|
||||
ENV MESHSTREAM_SERVER_PORT=5446
|
||||
ENV MESHSTREAM_SERVER_PORT=8080
|
||||
ENV MESHSTREAM_STATIC_DIR=/app/static
|
||||
|
||||
# Reporting configuration
|
||||
|
||||
@@ -17,7 +17,7 @@ services:
|
||||
- MESHSTREAM_GOOGLE_MAPS_ID=${MESHSTREAM_GOOGLE_MAPS_ID}
|
||||
- MESHSTREAM_GOOGLE_MAPS_API_KEY=${MESHSTREAM_GOOGLE_MAPS_API_KEY}
|
||||
ports:
|
||||
- "5446:5446"
|
||||
- "5446:8080"
|
||||
environment:
|
||||
# Runtime configuration with defaults from .env file or inline defaults
|
||||
# MQTT connection settings
|
||||
@@ -37,7 +37,7 @@ services:
|
||||
|
||||
# Server configuration
|
||||
- MESHSTREAM_SERVER_HOST=${MESHSTREAM_SERVER_HOST:-0.0.0.0}
|
||||
- MESHSTREAM_SERVER_PORT=${MESHSTREAM_SERVER_PORT:-5446}
|
||||
- MESHSTREAM_SERVER_PORT=${MESHSTREAM_SERVER_PORT:-8080}
|
||||
- MESHSTREAM_STATIC_DIR=${MESHSTREAM_STATIC_DIR:-/app/static}
|
||||
|
||||
# Logging and debugging
|
||||
@@ -49,7 +49,7 @@ services:
|
||||
- MESHSTREAM_CHANNEL_KEYS=${MESHSTREAM_CHANNEL_KEYS:-}
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "--spider", "http://localhost:5446/api/status"]
|
||||
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8080/api/status"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
Reference in New Issue
Block a user