mirror of
https://github.com/sstent/foodplanner.git
synced 2026-02-01 06:31:36 +00:00
added alembic database migrations, json import/export
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -40,6 +40,11 @@ COPY --from=builder /app/venv /app/venv
|
||||
# Activate the virtual environment
|
||||
ENV PATH="/app/venv/bin:$PATH"
|
||||
|
||||
# Create data directory and set permissions
|
||||
RUN mkdir -p /app/data && \
|
||||
touch /app/data/meal_planner.db && \
|
||||
chown -R appuser:appuser /app/data
|
||||
|
||||
# Copy application code
|
||||
COPY . .
|
||||
|
||||
@@ -49,6 +54,13 @@ RUN chown -R appuser:appuser /app
|
||||
# Switch to non-root user
|
||||
USER appuser
|
||||
|
||||
# Set working directory to /app for the application
|
||||
WORKDIR /app
|
||||
|
||||
# Set environment variables
|
||||
ENV DATABASE_PATH=/app/data
|
||||
ENV DATABASE_URL=sqlite:////app/data/meal_planner.db
|
||||
|
||||
# Expose port (as defined in main.py)
|
||||
EXPOSE 8999
|
||||
|
||||
|
||||
Reference in New Issue
Block a user