mirror of
https://github.com/sstent/foodplanner.git
synced 2025-12-06 08:01:47 +00:00
added alembic database migrations, json import/export
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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",
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user