-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (35 loc) · 1.26 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
FROM python:3.10 as base
RUN apt-get update \
&& apt-get install -y shadowsocks-libev \
&& pip install -U pdm pip wheel \
&& wget https://github.com/shadowsocks/v2ray-plugin/releases/download/v1.3.1/v2ray-plugin-linux-amd64-v1.3.1.tar.gz \
&& tar -xzvf v2ray-plugin-linux-*-v1.3.1.tar.gz -C /bin/ \
&& ln -s /bin/v2ray-plugin_linux_amd64 /bin/v2ray-plugin
ARG VERSION
FROM base as builder
WORKDIR /opt/builder
COPY ./pyproject.toml ./
COPY ./pdm.lock ./
RUN pdm install
COPY ./ ./
RUN pdm install \
&& pdm export -f requirements > requirements.txt \
&& pdm export -f setuppy >setup.py \
&& pip install -r requirements.txt \
&& python setup.py develop \
&& python setup.py bdist_wheel
FROM base
WORKDIR /opt/easyclimbwall
COPY --from=builder /opt/builder/dist/ ./
COPY ./.docker/ /
RUN pip install easy_climb_wall-0.1.0-py3-none-any.whl \
&& python -m x007007007.easyclimbwall collectstatic --no-input
ENV DATA_FOLDER=/data \
SS_SERVER_CMD=ss-server \
SS_V2RAY_PLUGIN_PATH=/bin/v2ray-plugin_linux_amd64 \
DOCKER_SERVICE_NAME=climb-wall-config \
SECRET_KEY= \
TRUSTED_ORIGINS=
ENTRYPOINT ["/entrypoint.sh"]
CMD ["gunicorn", "x007007007.easyclimbwall.wsgi:application", "-b", "0.0.0.0:8000", "-k", "gevent"]
VOLUME ["/data"]