Commit 8dfef6d7 authored by wangpeng's avatar wangpeng

docker构建完成

parent 7f74f39a
......@@ -8,12 +8,20 @@ WORKDIR /root/.ssh/
ADD ssh/id_rsa .
ADD ./sources.list /etc/apt/sources.list
WORKDIR /srv/apps/sun/
RUN chmod -R 600 /root/.ssh/id_rsa \
&& echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config \
&& mkdir -p /data/log/sun/app
RUN apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32 \
&& apt-get -y update && apt-get -y install mysql-client libmysqlclient-dev \
&& apt-get clean \
&& apt-get autoclean \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt
ENTRYPOINT [ "python", "manage.py", "runserver"]
ENTRYPOINT bash -c 'source ~/.bashrc && gunicorn sun.wsgi:application -w 4 -b 0.0.0.0:8090 -k gevent'
......@@ -45,4 +45,5 @@ docker build . -t sun-test:1.0
docker run -it -p 8990:8000 -d \
--volume=/etc/gm-config:/etc/gm-config \
--volume=/etc/resolv.conf:/etc/resolv.conf \
--volume=/srv/apps/sun/sun/settings_local.py:/srv/apps/sun/sun/settings_local.py sun-test:1.0
--volume=/srv/apps/sun/sun/settings_local.py:/srv/apps/sun/sun/settings_local.py \
--entrypoint="/bin/bash" sun-test:1.0 "-c" "source ~/.bashrc && gunicorn sun.wsgi:application -w 4 -b 0.0.0.0:8090 -k gevent"
......@@ -20,7 +20,3 @@ kombu==4.2.2.post1
requests==2.21.0
redis==2.10.6
openpyxl==2.6.2
\ No newline at end of file
six==1.9.0
cached-property==1.3.0
jsonschema==2.5.1
monotonic==1.2
\ No newline at end of file
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