-
-
Notifications
You must be signed in to change notification settings - Fork 40
/
Dockerfile
30 lines (23 loc) · 904 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
# nginx-gunicorn-flask
FROM ubuntu:latest
MAINTAINER Hiller Liao <hillerliao@163.com>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get install -y python3 python3-pip python3-virtualenv nginx supervisor
# Setup flask application
RUN mkdir -p /app
COPY . /app
RUN pip install -r /app/requirements.txt -i https://mirrors.aliyun.com/pypi/simple
RUN pip install gunicorn
# RUN pip install git+https://github.com/getsyncr/notion-sdk.git
# Setup nginx
RUN rm /etc/nginx/sites-enabled/default
COPY flask.conf /etc/nginx/sites-available/
RUN ln -s /etc/nginx/sites-available/flask.conf /etc/nginx/sites-enabled/flask.conf
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
# Setup supervisord
RUN mkdir -p /var/log/supervisor
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY gunicorn.conf /etc/supervisor/conf.d/gunicorn.conf
# Start processes
CMD ["/usr/bin/supervisord"]