Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ result
**/postgres_data/
.pg_data/
**/.env
tor-data

# Mutation testing artifacts
mutants.out/
Expand Down
34 changes: 34 additions & 0 deletions docker-compose.tor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
services:
mint:
image: cashubtc/mintd:latest
# build:
# context: .
# dockerfile: Dockerfile
container_name: mint
ports:
- "8085:8085"
environment:
- CDK_MINTD_LISTEN_HOST=0.0.0.0
- CDK_MINTD_LISTEN_PORT=8085
# - CDK_MINTD_MNEMONIC= Set your 12 words backup mnemonic here
- CDK_MINTD_LN_BACKEND=fakewallet
- CDK_MINTD_DATABASE=sqlite
- CDK_MINTD_CACHE_BACKEND=memory
- CDK_MINTD_PROMETHEUS_ENABLED=false
command: ["cdk-mintd"]
networks:
- cdk
tor:
build: ./tor
container_name: tor
restart: unless-stopped
volumes:
- ./tor-data:/var/lib/tor/mint
- ./torrc:/etc/tor/torrc
depends_on:
- mint
networks:
- cdk
networks:
cdk:
driver: bridge
13 changes: 13 additions & 0 deletions tor/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM debian:stable

RUN apt-get update && \
apt-get install -y tor && \
rm -rf /var/lib/apt/lists/*

RUN mkdir -p /var/lib/tor/hidden_service
USER root

# Entry script will fix permissions THEN start Tor
CMD chown -R debian-tor:debian-tor /var/lib/tor && \
chmod -R 700 /var/lib/tor && \
su debian-tor -s /bin/sh -c "tor -f /etc/tor/torrc"
2 changes: 2 additions & 0 deletions torrc
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be in the root or can we move it to the tor dir?

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
HiddenServiceDir /var/lib/tor/mint
HiddenServicePort 80 mint:8085