mirror of
https://github.com/sstent/foodplanner.git
synced 2026-02-06 09:01:38 +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 application code
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Change ownership of the app directory
|
# Ensure appuser owns all files
|
||||||
RUN chown -R appuser:appuser /app
|
RUN chown -R appuser:appuser /app
|
||||||
|
|
||||||
# Switch to non-root user
|
# Switch to non-root user
|
||||||
USER appuser
|
#USER appuser
|
||||||
|
|
||||||
# Set working directory to /app for the application
|
# Set working directory to /app for the application
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@@ -60,6 +60,11 @@ WORKDIR /app
|
|||||||
ENV DATABASE_PATH=/app/data
|
ENV DATABASE_PATH=/app/data
|
||||||
ENV DATABASE_URL=sqlite:////app/data/meal_planner.db
|
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 port (as defined in main.py)
|
||||||
EXPOSE 8999
|
EXPOSE 8999
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ job "foodplanner" {
|
|||||||
# Mount the SQLite database file to persist data
|
# Mount the SQLite database file to persist data
|
||||||
# Adjust the source path as needed for your environment
|
# Adjust the source path as needed for your environment
|
||||||
volumes = [
|
volumes = [
|
||||||
"/alloc/tmp/:/app/data/",
|
"/alloc/data/:/app/data/",
|
||||||
"/mnt/Public/configs/FoodPlanner_backups:/backups",
|
"/mnt/Public/configs/FoodPlanner_backups:/backups",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user