forked from CampusPulse/access-directory
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (22 loc) · 757 Bytes
/
Copy pathDockerfile
File metadata and controls
32 lines (22 loc) · 757 Bytes
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
FROM python:3.10-slim
# git is needed for getting the repo commit
RUN apt-get update && apt-get install -y git libmagic1
RUN pip install pipenv
# Set the working directory in the container
# pipenv doesnt want to be run as root
RUN useradd -ms /bin/bash campuspulse
USER campuspulse
WORKDIR /app
# needed because we changed users
RUN git config --global --add safe.directory /app
# ADD Pipfile.lock Pipfile .
COPY Pipfile.lock Pipfile.lock
COPY Pipfile Pipfile
# Copy requirements file and install dependencies
RUN pipenv install --system --deploy
# Copy the app's source code to the container
COPY . .
# Expose the port the Flask app runs on
EXPOSE 5000
# Run the Flask application
CMD python3 -m gunicorn --workers 1 --bind 0.0.0.0:5000 app:app