Mini fixes

This commit is contained in:
blankhex committed 2026-10-16 00:29:00 +03:00
1 parent c578b91c2d
commit fd2e7f6cd8
2 files changed
+7 -4

No files matched your search

+5 -1
View File
@@ -38,6 +38,7 @@ WORKDIR /app
# Copy the binary from the builder stage
COPY --from=builder /app/server /app/server
RUN chmod +x /app/server
# Copy static and template assets from the project source
COPY --from=builder /build/static /app/static
@@ -46,10 +47,13 @@ COPY --from=builder /build/templates /app/templates
# Ensure the app user owns the working dir (DB file created here at runtime)
RUN chown -R app:app /app
# Create a dedicated subdirectory for persistable data (mounted as a volume)
RUN mkdir -p /app/data
USER app
# Expose the HTTP port
EXPOSE 8080
# Default command
CMD ["./server", "-addr", ":8080"]
CMD ["/app/server", "-addr", ":8080", "-db", "/app/data/state.db"]
+2 -3
View File
@@ -5,12 +5,11 @@ services:
build:
context: .
dockerfile: Dockerfile
container_name: uportal
ports:
- "8080:8080"
volumes:
# Bind mount to persist the SQLite database file locally in ./data/
- ./data:/app
# Bind mount only the data subdirectory, so /app/server and assets are NOT overwritten
- ./data:/app/data
environment:
LOG_LEVEL: info
# Optional configuration (uncomment as needed):