commit
This commit is contained in:
+37
@@ -0,0 +1,37 @@
|
||||
FROM python:3.11-slim
|
||||
|
||||
ENV PYTHONUNBUFFERED=1 \
|
||||
PIP_NO_CACHE_DIR=1 \
|
||||
FLASK_ENV=production \
|
||||
VPN_CONFIG_DIR=/vpn/configs \
|
||||
VPN_RUNTIME_DIR=/vpn/runtime
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
dumb-init \
|
||||
openvpn \
|
||||
iproute2 \
|
||||
iputils-ping \
|
||||
net-tools \
|
||||
openssh-client \
|
||||
ansible \
|
||||
sshpass \
|
||||
jq \
|
||||
curl \
|
||||
tzdata \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt /tmp/requirements.txt
|
||||
RUN pip install --upgrade pip \
|
||||
&& pip install -r /tmp/requirements.txt
|
||||
|
||||
COPY . /app
|
||||
|
||||
RUN mkdir -p /vpn/configs /vpn/runtime
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||
CMD ["gunicorn", "--timeout", "300", "--bind", "0.0.0.0:8000", "app:app"]
|
||||
Reference in New Issue
Block a user