-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (23 loc) · 776 Bytes
/
Dockerfile
File metadata and controls
30 lines (23 loc) · 776 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
# set base image (host OS)
FROM python:3.10-alpine
# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV DEBUG 1
ENV PORT 8000
ENV SECRET_KEY (xanfn-ico)rsfcf((5fc*@$inret(k$2rmf(kevi%n@_pf!ca #docker image testing secret key
# set the working directory in the container
WORKDIR /app
# install psycopg2
RUN apk update \
&& apk add --virtual build-essential gcc python3-dev musl-dev \
&& apk add postgresql-dev \
&& pip install psycopg2
# copy the dependencies file to the working directory
COPY ./requirements.txt .
RUN pip install -r requirements.txt
# copy the content of the local src directory to the working directory
COPY . .
EXPOSE 8000
# run gunicorn
CMD gunicorn oc_lettings_site.wsgi:application --bind 0.0.0.0:$PORT