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