sync
This commit is contained in:
parent
54daf115dd
commit
fdefa834de
40
Dockerfile
40
Dockerfile
@ -7,28 +7,36 @@ ENV LANG C.UTF-8
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# install syncserver dependencies
|
||||||
|
COPY ./requirements.txt /app/requirements.txt
|
||||||
|
COPY ./dev-requirements.txt /app/dev-requirements.txt
|
||||||
|
COPY ./syncserver /app/syncserver
|
||||||
|
COPY ./setup.py /app
|
||||||
|
|
||||||
|
RUN apt-get -qq update && \
|
||||||
|
apt-get -qq --yes install g++ curl && \
|
||||||
|
pip install --upgrade --no-cache-dir -r requirements.txt && \
|
||||||
|
pip install --upgrade --no-cache-dir -r dev-requirements.txt && \
|
||||||
|
apt-get -qq --yes remove --purge g++ && \
|
||||||
|
apt-get -qq --yes autoremove --purge && \
|
||||||
|
apt-get -qq --yes clean all && \
|
||||||
|
rm -rf "/usr/share/doc/"* \
|
||||||
|
"/var/cache/"* \
|
||||||
|
"/var/lib/apt/lists/"* \
|
||||||
|
"/usr/src/"* \
|
||||||
|
"/var/cache/"* \
|
||||||
|
"/var/log/"{apt/*,dpkg.log} \
|
||||||
|
"/var/www/html" \
|
||||||
|
"/tmp/"* && \
|
||||||
|
python ./setup.py develop
|
||||||
|
|
||||||
# Add Tini
|
# Add Tini
|
||||||
ENV "TINI_VERSION" "v0.16.1"
|
ENV "TINI_VERSION" "v0.16.1"
|
||||||
ADD "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini" "/tini"
|
ADD "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini" "/tini"
|
||||||
RUN chmod +x "/tini"
|
RUN chmod +x "/tini"
|
||||||
ENTRYPOINT ["/tini", "--"]
|
ENTRYPOINT ["/tini", "--"]
|
||||||
|
|
||||||
# install syncserver dependencies
|
|
||||||
COPY ./requirements.txt /app/requirements.txt
|
|
||||||
COPY ./dev-requirements.txt /app/dev-requirements.txt
|
|
||||||
RUN apt-get -q update \
|
|
||||||
&& apt-get -q --yes install g++ \
|
|
||||||
&& pip install --upgrade --no-cache-dir -r requirements.txt \
|
|
||||||
&& pip install --upgrade --no-cache-dir -r dev-requirements.txt \
|
|
||||||
&& apt-get -q --yes remove g++ \
|
|
||||||
&& apt-get -q --yes autoremove \
|
|
||||||
&& apt-get clean
|
|
||||||
|
|
||||||
COPY ./syncserver /app/syncserver
|
|
||||||
COPY ./setup.py /app
|
|
||||||
RUN python ./setup.py develop
|
|
||||||
|
|
||||||
# run as non priviledged user
|
# run as non priviledged user
|
||||||
USER app
|
USER app
|
||||||
|
|
||||||
CMD [ "/usr/local/bin/gunicorn", "syncserver.wsgi_app" ]
|
CMD [ "/usr/local/bin/gunicorn", "--paste", "/app/config/syncserver.ini" ]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user