feat: add Tor support for relay service

Add Tor support for the relay service in the docker-compose file. Also, rename the service from `wot-relay` to `relay`. Add a new `torrc` configuration file and a `.gitignore` file in the `tor/data` directory to prevent sensitive data from being tracked. Also, create a new `docker-compose.tor.yml` file for Tor-specific configurations.
This commit is contained in:
fsociety 2024-09-07 16:37:58 +02:00
parent 8458b2a10f
commit 6372f55a7b
4 changed files with 31 additions and 1 deletions

26
docker-compose.tor.yml Normal file
View File

@ -0,0 +1,26 @@
services:
relay:
container_name: wot-relay
build:
context: .
dockerfile: Dockerfile
env_file:
- .env
volumes:
- "./db:/app/db"
- "./templates/index.html:/app/templates/index.html"
- "./templates/static:/app/templates/static"
ports:
- "3334" # disable clearnet access
#- "3334:3334" # enable clearnet access
tor:
image: lncm/tor:0.4.7.9@sha256:86c2fe9d9099e6376798979110b8b9a3ee5d8adec27289ac4a5ee892514ffe92
container_name: wot-relay-tor
depends_on:
- relay
volumes:
- ./tor/torrc:/etc/tor/torrc
- ./tor/data:/var/lib/tor
restart: on-failure
stop_grace_period: 10m30s

View File

@ -1,5 +1,5 @@
services:
wot-relay:
relay:
container_name: wot-relay
build:
context: .

2
tor/data/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

2
tor/torrc Normal file
View File

@ -0,0 +1,2 @@
HiddenServiceDir /var/lib/tor/relay
HiddenServicePort 80 relay:3334