build: establecer DATA_DIR por defecto y declarar volumen /app/data

Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
webui
brobert 2 weeks ago
parent f6672ec52b
commit 1e188c2e96

@ -4,6 +4,8 @@ FROM oven/bun:1.1 as base
# Install basic debugging tools
RUN apt-get update && apt-get install -y curl netcat sqlite3
WORKDIR /app
# Default data dir for SQLite; can be overridden by DB_PATH at runtime (DB_PATH has priority)
ENV DATA_DIR=/app/data
# Create data directory with proper permissions
RUN mkdir -p /app/data && chown -R bun:bun /app/data
@ -22,6 +24,8 @@ HEALTHCHECK --start-period=30s --interval=30s --timeout=3s --retries=3 \
# Server runs on port from environment variable
EXPOSE ${PORT:-3007}
# Declare volume for persistent data by default
VOLUME ["/app/data"]
# Make script executable
COPY startup.sh ./

Loading…
Cancel
Save