External tor and temporary session settings
This commit is contained in:
parent
5a08cbc89f
commit
5fe21744e9
|
@ -1,2 +1 @@
|
|||
.*~
|
||||
certificates/
|
||||
users.json
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
FROM alpine:latest as fetcher
|
||||
|
||||
WORKDIR /tmp
|
||||
RUN apk add --no-cache --update curl tar ca-certificates
|
||||
RUN curl -L https://github.com/HelloZeroNet/ZeroNet/archive/py3/ZeroNet-py3.tar.gz | tar xvpz
|
||||
|
||||
# Switch to pypy after https://bitbucket.org/pypy/pypy/commits/e7f5d75f3f87 fix works in upstream
|
||||
FROM python:latest
|
||||
WORKDIR /app
|
||||
RUN useradd -lM zeronet
|
||||
COPY --from=fetcher /tmp/ZeroNet-py3/* ./
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
EXPOSE 43110
|
||||
ENTRYPOINT ["python"]
|
||||
CMD ["/app/zeronet.py"]
|
17
zeronet.yml
17
zeronet.yml
|
@ -6,14 +6,19 @@ x-logging: &json-log
|
|||
max-size: 20m
|
||||
max-file: '5'
|
||||
|
||||
volumes:
|
||||
data:
|
||||
networks:
|
||||
tor_backend:
|
||||
external: true
|
||||
|
||||
services:
|
||||
server:
|
||||
image: localhost:5000/zeronet
|
||||
command: ["zeronet.py", "--tor", "always", "--tor-proxy", "tor_server:9050", "--ui-ip", "*"]
|
||||
deploy:
|
||||
replicas: 1
|
||||
resources:
|
||||
limits:
|
||||
memory: '500M'
|
||||
restart_policy:
|
||||
condition: any
|
||||
update_config:
|
||||
|
@ -24,9 +29,9 @@ services:
|
|||
placement:
|
||||
constraints: [node.hostname == fra-n4]
|
||||
logging: *json-log
|
||||
environment:
|
||||
ENABLE_TOR: 'true'
|
||||
networks:
|
||||
- tor_backend
|
||||
ports:
|
||||
- '43110:43110'
|
||||
volumes:
|
||||
- 'data:/root/data'
|
||||
tmpfs:
|
||||
- '/app/data'
|
||||
|
|
Reference in New Issue