added alembic database migrations, json import/export

This commit is contained in:
2025-09-28 14:32:52 -07:00
parent 0d72e494bc
commit ab4a95fa3a
2 changed files with 8 additions and 3 deletions

View File

@@ -47,11 +47,11 @@ RUN mkdir -p /app/data && \
# Copy application code
COPY . .
# Change ownership of the app directory
# Ensure appuser owns all files
RUN chown -R appuser:appuser /app
# Switch to non-root user
USER appuser
#USER appuser
# Set working directory to /app for the application
WORKDIR /app
@@ -60,6 +60,11 @@ WORKDIR /app
ENV DATABASE_PATH=/app/data
ENV DATABASE_URL=sqlite:////app/data/meal_planner.db
# Verify directory ownership (for debugging)
RUN ls -ld /app/data && \
touch /app/data/test_write.txt && \
echo "Write test successful" > /app/data/test_write.txt
# Expose port (as defined in main.py)
EXPOSE 8999

View File

@@ -56,7 +56,7 @@ job "foodplanner" {
# Mount the SQLite database file to persist data
# Adjust the source path as needed for your environment
volumes = [
"/alloc/tmp/:/app/data/",
"/alloc/data/:/app/data/",
"/mnt/Public/configs/FoodPlanner_backups:/backups",
]
}