Commit fb2f1a23 authored by nanahira's avatar nanahira

improve

parent 9d7bf47d
...@@ -3,33 +3,27 @@ FROM node:stretch-slim ...@@ -3,33 +3,27 @@ FROM node:stretch-slim
#RUN sed -i 's/deb.debian.org/mirrors.163.com/g' /etc/apt/sources.list && \ #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 # sed -i 's/security.debian.org/mirrors.163.com/g' /etc/apt/sources.list
#pm2 #dependencies
RUN npm install -g pm2
# apt
RUN apt update && \ RUN apt update && \
env DEBIAN_FRONTEND=noninteractive apt install -y git python2.7 python-virtualenv python3.5 python3-virtualenv ffmpeg nginx && \ env DEBIAN_FRONTEND=noninteractive apt install -y git python2.7 python-virtualenv python3.5 python3-virtualenv ffmpeg nginx && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/* && \
npm install -g pm2
COPY . /taiko-web COPY . /taiko-web
WORKDIR /taiko-web WORKDIR /taiko-web
#python virtualenv # envs
RUN bash -c 'virtualenv -p /usr/bin/python2 .venv2 && \ RUN bash -c 'virtualenv -p /usr/bin/python2 .venv2 && \
source .venv2/bin/activate && \ source .venv2/bin/activate && \
pip install Flask Flask-Caching ffmpy gunicorn redis && \ pip install Flask Flask-Caching ffmpy gunicorn redis && \
deactivate' deactivate' && \
bash -c 'virtualenv -p /usr/bin/python3 .venv3 && \
RUN bash -c 'virtualenv -p /usr/bin/python3 .venv3 && \
source .venv3/bin/activate && \ source .venv3/bin/activate && \
pip install websockets && \ pip install websockets && \
deactivate' deactivate' && \
ln -s /taiko-web/templates/index.html /taiko-web/public/index.html && \
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 && \
ln -s /taiko-web/public/songs/taiko.db /taiko-web/taiko.db cp -rf /taiko-web/docker/taiko-web-nginx.conf /etc/nginx/conf.d/ && \
#nginx
RUN cp -rf /taiko-web/docker/taiko-web-nginx.conf /etc/nginx/conf.d/ && \
rm -rf /etc/nginx/sites-enabled/* rm -rf /etc/nginx/sites-enabled/*
#info #info
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment