Added persistent state to tor service
This commit is contained in:
parent
ffe167767c
commit
8c02e4f231
|
@ -8,6 +8,8 @@ services:
|
||||||
args:
|
args:
|
||||||
- SVC_PORT=${BROKER_MQTT_PORT}
|
- SVC_PORT=${BROKER_MQTT_PORT}
|
||||||
- SVC_HOST=broker
|
- SVC_HOST=broker
|
||||||
|
volumes:
|
||||||
|
- tor_config:/var/lib/tor
|
||||||
networks:
|
networks:
|
||||||
- tor_net
|
- tor_net
|
||||||
depends_on:
|
depends_on:
|
||||||
|
@ -40,6 +42,7 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
broker_data:
|
broker_data:
|
||||||
client_data:
|
client_data:
|
||||||
|
tor_config:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
tor_net:
|
tor_net:
|
||||||
|
|
25
scripts/tor-vol-migration.sh
Executable file
25
scripts/tor-vol-migration.sh
Executable file
|
@ -0,0 +1,25 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Script to migrate from volume-less tor instance to one that retains
|
||||||
|
# tor hidden service state (onion url, etc.)
|
||||||
|
|
||||||
|
mkdir -p backup/tor
|
||||||
|
docker cp torch-subscriber-docker_tor_1:/var/lib/tor/svc backup/tor/
|
||||||
|
|
||||||
|
docker-compose down
|
||||||
|
docker-compose up --no-start
|
||||||
|
|
||||||
|
docker run --rm \
|
||||||
|
-v $(pwd)/backup/tor:/backup \
|
||||||
|
-v torch-subscriber-docker_tor_config:/tor \
|
||||||
|
ubuntu \
|
||||||
|
cp -r /backup/svc /tor/
|
||||||
|
|
||||||
|
docker run --rm \
|
||||||
|
-v torch-subscriber-docker_tor_config:/tor \
|
||||||
|
ubuntu \
|
||||||
|
chown -R 0:0 /tor
|
||||||
|
|
||||||
|
rm -rf backup
|
||||||
|
|
||||||
|
docker-compose up -d
|
Loading…
Reference in New Issue
Block a user