2019-06-27 13:18:24 +08:00
|
|
|
FROM node:stretch-slim
|
2019-06-01 23:01:50 +08:00
|
|
|
|
|
|
|
#RUN sed -i 's/deb.debian.org/mirrors.163.com/g' /etc/apt/sources.list && \
|
|
|
|
# sed -i 's/security.debian.org/mirrors.163.com/g' /etc/apt/sources.list
|
|
|
|
|
|
|
|
|
|
|
|
# apt
|
|
|
|
RUN apt update && \
|
2019-06-27 13:44:56 +08:00
|
|
|
env DEBIAN_FRONTEND=noninteractive apt install -y git python2.7 python-virtualenv python3.5 python3-virtualenv ffmpeg nginx
|
2019-06-01 23:01:50 +08:00
|
|
|
|
|
|
|
#pm2
|
|
|
|
RUN npm install -g pm2
|
|
|
|
|
|
|
|
COPY . /taiko-web
|
|
|
|
WORKDIR /taiko-web
|
|
|
|
|
|
|
|
#python virtualenv
|
|
|
|
RUN bash -c 'virtualenv -p /usr/bin/python2 .venv2 && \
|
|
|
|
source .venv2/bin/activate && \
|
2019-07-31 20:16:36 +08:00
|
|
|
pip install Flask Flask-Caching ffmpy gunicorn redis && \
|
2019-06-01 23:01:50 +08:00
|
|
|
deactivate'
|
|
|
|
|
|
|
|
RUN bash -c 'virtualenv -p /usr/bin/python3 .venv3 && \
|
|
|
|
source .venv3/bin/activate && \
|
|
|
|
pip install websockets && \
|
|
|
|
deactivate'
|
|
|
|
|
|
|
|
RUN ln -s /taiko-web/templates/index.html /taiko-web/public/index.html && \
|
|
|
|
ln -s /taiko-web/public/songs/taiko.db /taiko-web/taiko.db
|
|
|
|
|
|
|
|
#nginx
|
|
|
|
RUN cp -rf /taiko-web/docker/taiko-web-nginx.conf /etc/nginx/conf.d/ && \
|
|
|
|
rm -rf /etc/nginx/sites-enabled/*
|
|
|
|
|
|
|
|
#info
|
|
|
|
EXPOSE 80
|
2019-07-16 22:38:31 +08:00
|
|
|
# VOLUME [ "/taiko-web/public/songs" ]
|
2019-07-21 11:27:19 +08:00
|
|
|
ENV TAIKO_URL http://taiko.example.com
|
|
|
|
ENV TAIKO_VERSION Nanahira
|
2019-06-01 23:01:50 +08:00
|
|
|
CMD [ "/taiko-web/docker/entrypoint.sh" ]
|