enable docker DB migrations
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -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"]
|
||||
Reference in New Issue
Block a user