forked from VKSRC/Github-Monitor
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
42 lines (31 loc) · 1.36 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
FROM ubuntu:16.04
MAINTAINER Tuuu Nya<[email protected]>
# install system requirement
RUN sed -i s/archive.ubuntu.com/mirrors.aliyun.com/g /etc/apt/sources.list
RUN sed -i s/security.ubuntu.com/mirrors.aliyun.com/g /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y python3 python3-dev python3-pip nginx supervisor libmysqlclient-dev redis-server && \
rm -rf /var/lib/apt/lists/*
# setup all the configfiles
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
COPY docker/nginx-app.conf /etc/nginx/sites-available/default
COPY docker/supervisor-app.conf /etc/supervisor/conf.d/
# copy server and client code
COPY client/dist/ /home/docker/Github-Monitor/client/
COPY server/ /home/docker/Github-Monitor/server/
# copy uwsgi.ini and uwsgi_params
COPY docker/uwsgi.ini /home/docker/Github-Monitor/server/
COPY docker/uwsgi_params /home/docker/Github-Monitor/server/
# copy run.sh
COPY docker/run.sh /home/docker/Github-Monitor/
COPY docker/wait-for-it.sh /home/docker/Github-Monitor/
RUN chmod +x /home/docker/Github-Monitor/wait-for-it.sh
# install requirement
RUN pip3 install -r /home/docker/Github-Monitor/server/requirements.pip -i http://pypi.doubanio.com/simple --trusted-host pypi.doubanio.com
# volumne
VOLUME ["/var/lib/redis"]
VOLUME ["/home/docker/Github-Monitor/.env"]
WORKDIR /home/docker/Github-Monitor/
ENV LANG C.UTF-8
EXPOSE 80
CMD ["/bin/bash", "run.sh"]