Initial commit
This commit is contained in:
+31
@@ -0,0 +1,31 @@
|
||||
# Dockerfile
|
||||
FROM python:slim
|
||||
|
||||
# Set work directory
|
||||
WORKDIR /app
|
||||
|
||||
# Install PostgreSQL client
|
||||
RUN apt-get update && \
|
||||
apt-get install -y postgresql-client && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy project files
|
||||
COPY . .
|
||||
|
||||
# Install dependencies
|
||||
RUN pip install --upgrade pip && pip install -r requirements.txt
|
||||
|
||||
# Copy and prepare entrypoint script
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
# Set environment variables
|
||||
ENV FLASK_APP=run.py
|
||||
ENV FLASK_RUN_HOST=0.0.0.0
|
||||
|
||||
# Expose port
|
||||
EXPOSE 5000
|
||||
|
||||
# Use entrypoint script
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
Reference in New Issue
Block a user