enable docker DB migrations

This commit is contained in:
2025-05-26 15:45:23 +02:00
parent 8832fe3061
commit 0bf66d4430
2 changed files with 30 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ WORKDIR /app
RUN apt-get update && apt-get install -y \
gcc \
postgresql-client \
netcat-traditional \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first to leverage Docker cache
@@ -15,12 +16,15 @@ RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
# Make entrypoint script executable
RUN chmod +x entrypoint.sh
# Set environment variables
ENV FLASK_APP=app.py
ENV FLASK_ENV=development
ENV FLASK_ENV=production
# Expose the port the app runs on
EXPOSE 5000
# Command to run the application
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app:app"]
# Use the entrypoint script
ENTRYPOINT ["./entrypoint.sh"]