Add docker-compose

This commit is contained in:
Maxim Portnyagin 2022-05-30 18:14:02 +04:00
parent bd6188eeb7
commit b9156bb913
No known key found for this signature in database
GPG key ID: 8F27C63672B69287
4 changed files with 53 additions and 43 deletions

View file

@ -1,21 +1,17 @@
FROM python:3.10.4-alpine
RUN apk --update --no-cache --no-progress add gcc libffi-dev musl-dev make tor openssl g++ \
&& echo "ControlPort 9051" >> /etc/tor/torrc \
&& echo "CookieAuthentication 1" >> /etc/tor/torrc
RUN apk --update --no-cache --no-progress add gcc libffi-dev musl-dev make openssl g++
WORKDIR /app
VOLUME /app/data
COPY . .
RUN python3 -m venv venv \
&& source venv/bin/activate \
&& python3 -m pip install -r requirements.txt
ENV ENABLE_TOR false
CMD (! ${ENABLE_TOR} || tor&) \
&& source venv/bin/activate \
&& python3 zeronet.py --ui_ip "*" --fileserver_port 26552
CMD source venv/bin/activate \
&& python3 zeronet.py --ui_ip "*" --fileserver_port 26552 \
--tor $TOR_ENABLED --tor_controller tor:$TOR_CONTROL_PORT \
--tor_proxy tor:$TOR_SOCKS_PORT --tor_password $TOR_CONTROL_PASSWD
EXPOSE 43110 26552