-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.txt
More file actions
25 lines (19 loc) · 760 Bytes
/
Copy pathDockerfile.txt
File metadata and controls
25 lines (19 loc) · 760 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
FROM python:3-alpine
ENV REDIS_URL 'redis://redis:6379'
ENV DJANGO_SETTINGS_MODULE 'settings'
ADD ./ /opt/otree
RUN apk -U add --no-cache postgresql-dev gcc musl-dev curl \
bash postgresql \
&& pip install -r /opt/otree/requirements.txt \
&& curl https://bin.equinox.io/c/ekMN3bCZFUn/forego-stable-linux-amd64.tgz -O \
&& cd /usr/local/bin \
&& tar -xf /forego-stable-linux-amd64.tgz \
&& rm /forego-stable-linux-amd64.tgz \
&& mkdir -p /opt/init \
&& chmod +x /opt/otree/entrypoint.sh \
&& apk del postgresql-dev gcc musl-dev curl
RUN echo "oTree: /bin/bash -c 'cd /opt/otree && otree runprodserver --port=80'"> /Procfile
WORKDIR /opt/otree
VOLUME /opt/init
ENTRYPOINT /opt/otree/entrypoint.sh
EXPOSE 80