u
This commit is contained in:
22
Dockerfile
22
Dockerfile
@@ -1,17 +1,33 @@
|
|||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
FROM debian:12-slim AS syslibs
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
libatomic1 libuuid1 libfontconfig1 libxml2 libfribidi0 \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
FROM gcr.io/distroless/cc-debian12
|
FROM gcr.io/distroless/cc-debian12
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Shared dynamic libraries needed by Node.js SEA and native addons (canvas, better-sqlite3)
|
||||||
|
COPY --from=syslibs /usr/lib/x86_64-linux-gnu/libatomic.so* /usr/lib/x86_64-linux-gnu/
|
||||||
|
COPY --from=syslibs /usr/lib/x86_64-linux-gnu/libuuid.so* /usr/lib/x86_64-linux-gnu/
|
||||||
|
COPY --from=syslibs /usr/lib/x86_64-linux-gnu/libfontconfig.so* /usr/lib/x86_64-linux-gnu/
|
||||||
|
COPY --from=syslibs /usr/lib/x86_64-linux-gnu/libxml2.so* /usr/lib/x86_64-linux-gnu/
|
||||||
|
COPY --from=syslibs /usr/lib/x86_64-linux-gnu/libfribidi.so* /usr/lib/x86_64-linux-gnu/
|
||||||
|
|
||||||
|
# Sibling dependencies for local symlink resolution
|
||||||
|
COPY dashdbschema /dashdbschema
|
||||||
|
COPY llmorbiter /llmorbiter
|
||||||
|
|
||||||
# The standalone SEA binary contains Node.js runtime, src/, package.json, and all app logic
|
# The standalone SEA binary contains Node.js runtime, src/, package.json, and all app logic
|
||||||
COPY dashback/dist/dashback ./dist/dashback
|
COPY dashback/dist/dashback ./dist/dashback
|
||||||
|
|
||||||
# Only native C++ addons and dependencies needed by the OS dynamic linker (dlopen)
|
# Native C++ addons and dependencies needed by the OS dynamic linker (dlopen)
|
||||||
COPY dashback/node_modules ./node_modules
|
COPY dashback/node_modules ./node_modules
|
||||||
|
|
||||||
# Set production defaults: port 4202 only, localhost only
|
# Set production defaults: port 4202
|
||||||
ENV NODE_ENV=production \
|
ENV NODE_ENV=production \
|
||||||
HOST=127.0.0.1 \
|
HOST=0.0.0.0 \
|
||||||
PORT=4202 \
|
PORT=4202 \
|
||||||
HTTPS_PORT=0 \
|
HTTPS_PORT=0 \
|
||||||
SQLITE_PATH=/app/data/dash.db \
|
SQLITE_PATH=/app/data/dash.db \
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- dash_net
|
- dash_net
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:4208:4208"
|
- "127.0.0.1:4202:4202"
|
||||||
environment:
|
environment:
|
||||||
- HOST=0.0.0.0
|
- HOST=0.0.0.0
|
||||||
- PORT=4208
|
- PORT=4202
|
||||||
- HTTPS_PORT=0
|
- HTTPS_PORT=0
|
||||||
- MSSQL_SERVER=sql_server
|
- MSSQL_SERVER=sql_server
|
||||||
- SQLITE_PATH=/app/data/dash.db
|
- SQLITE_PATH=/app/data/dash.db
|
||||||
@@ -27,13 +27,8 @@ services:
|
|||||||
- path: .env
|
- path: .env
|
||||||
required: false
|
required: false
|
||||||
volumes:
|
volumes:
|
||||||
# Shared repo directory (read-only)
|
|
||||||
- .:/app:ro
|
|
||||||
# Writable data directory
|
# Writable data directory
|
||||||
- ./data:/app/data:rw
|
- ./data:/app/data:rw
|
||||||
# Sibling repositories for local symlink resolution
|
|
||||||
- ../dashdbschema:/dashdbschema:ro
|
|
||||||
- ../llmorbiter:/llmorbiter:ro
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
Reference in New Issue
Block a user