-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
29 lines (20 loc) · 874 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
# docker build -t chess-server .
# sudo docker run -p 80:80 -it chess-server
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
ENV REDIS_URL=127.0.0.1
RUN apt-get update
RUN apt-get install -y python3 gunicorn supervisor git nginx redis-server
RUN apt-get install python3-pip -y && pip3 install --no-cache-dir --upgrade pip
COPY requirements.txt /tmp/requirements.txt
RUN pip3 install -r /tmp/requirements.txt
RUN rm /etc/nginx/sites-enabled/default
COPY chess-server.conf /etc/nginx/sites-available/
RUN ln -s /etc/nginx/sites-available/chess-server.conf /etc/nginx/sites-enabled/chess-server.conf
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
RUN mkdir -p /var/log/supervisor
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY gunicorn.conf /etc/supervisor/conf.d/gunicorn.conf
RUN python3 --version
COPY . /app
CMD ["/usr/bin/supervisord"]