-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
38 lines (28 loc) · 947 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Configuration for the Open Course website server Docker container
#
# VOID Tech (c) 2023 by VOID Tech
#
# Use minimal Python image
FROM python:3.8.2-slim-buster
# Set the working directory to /app
WORKDIR /open-course
# Update pip
RUN pip install --upgrade pip
RUN pip install --upgrade setuptools
# Copy the current directory contents.
COPY requirements.txt ./
# Install dependencies
RUN apt-get update && \
apt-get install -y libpq-dev gcc && \
rm -rf /var/lib/apt/lists/*
# Install any needed packages specified in requirements.txt
RUN pip install -r requirements.txt
RUN pip install python-dotenv
# Copy the current directory contents into the container at /app
COPY . ./
# Make port 8000 available to the world outside this container
EXPOSE 8000
# ENV FLASK_ENV=development
RUN pip install gunicorn
# Run website inside the container using gunicorn
CMD ["gunicorn", "-w", "2", "-b", "0.0.0.0:8000", "application:app"]