-
Notifications
You must be signed in to change notification settings - Fork 73
/
Dockerfile
31 lines (19 loc) · 872 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
FROM ubuntu:latest
RUN apt update -y && apt install -yq python3-dev python3-pip
# We copy just the requirements.txt first to leverage Docker cache
COPY ./requirements.txt /app/requirements.txt
WORKDIR /app
RUN pip install -r requirements.txt
COPY . /app
ENV FLASK_APP=run.py
ENV C_FORCE_ROOT="true"
ENV SQLALCHEMY_DATABASE_URI="postgresql://enferno:verystrongpass@postgres/enferno"
ENV CELERY_BROKER_URL="redis://:verystrongpass@redis:6379/10"
ENV CELERY_RESULT_BACKEND="redis://:verystrongpass@redis:6379/11"
ENV SESSION_REDIS="redis://:verystrongpass@redis:6379/1"
RUN echo 'alias act="source env/bin/activate"' >> ~/.bashrc
RUN echo 'alias ee="export FLASK_APP=run.py && export FLASK_DEBUG=0"' >> ~/.bashrc
CMD [ "uwsgi", "--http", "0.0.0.0:5000", \
"--protocol", "uwsgi", \
"--master", \
"--wsgi", "run:app" ]