forked from atharmarajah/Activity-CE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (23 loc) · 921 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
# Pull base image
FROM python:3.8.0-alpine
# set work directory
WORKDIR /usr/src/activity
RUN apk --update --upgrade add gcc musl-dev jpeg-dev zlib-dev libffi-dev cairo-dev pango-dev gdk-pixbuf
# make psycopg2-binary install on alpine
RUN apk update && apk add postgresql-dev gcc python3-dev musl-dev
# Set environment varibles
ENV PYTHONDONTWRITEBYTECODE 1 #Prevents Python from writing pyc files to disc
ENV PYTHONUNBUFFERED 1 #Prevents Python from buffering stdout and stderr
# Set environment variables
ENV ACTIVITY_CE_DB_ENGINE=django.db.backends.postgresql
ENV ACTIVITY_CE_DB_NAME=activity_dev
ENV ACTIVITY_CE_DB_USER=activity
ENV ACTIVITY_CE_DB_PASSWORD=activity
ENV ACTIVITY_CE_DB_HOST=db
ENV ACTIVITY_CE_DB_PORT=5432
# Install dependencies
RUN pip install --upgrade pip
COPY ./requirements.txt /usr/src/activity/requirements.txt
RUN pip install -r requirements.txt
# Copy project
COPY . /usr/src/activity/