-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.nodes-with-vpn.yml
81 lines (79 loc) · 2.44 KB
/
docker-compose.nodes-with-vpn.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
version: "3.9"
services:
# See here for more:
# https://www.linuxserver.io/blog/routing-docker-host-and-container-traffic-through-wireguard
wireguard:
image: lscr.io/linuxserver/wireguard:latest
container_name: wireguard
cap_add:
- NET_ADMIN
- SYS_MODULE
environment:
- PUID=1000
- PGID=1000
# ADJUST: Your timezone. Only useful for logs, afaik.
- TZ=Europe/London
networks:
wgnet:
# This is the GATEWAY the other containers need to connect to.
ipv4_address: 10.50.0.10
volumes:
- ./mounts/wireguard:/config
- /lib/modules:/lib/modules
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
restart: unless-stopped
bitcoin:
build:
context: ./services/bitcoin
args:
- DL_LINK=https://bitcoincore.org/bin/bitcoin-core-23.0/bitcoin-23.0-x86_64-linux-gnu.tar.gz
- CHECKSUM=2cca490c1f2842884a3c5b0606f179f9f937177da4eadd628e3f7fd7e25d26d0
depends_on:
- wireguard
cap_add:
- NET_ADMIN
environment:
- INSTALL_VPN=true
# Gateway to route traffic through. Should be equal to
# `services.wireguard.networks.wgnet.ipv4_address`.
- GATEWAY=10.50.0.10
# ADJUST: Passed on to `bitcoind`. Adjust according to your needs.
# Note that `-datadir` points to the mounted volume.
- CLI_ARGS=-datadir=/data -port=8333 -prune=1024
volumes:
- ./mounts/bitcoin:/data
networks:
wgnet:
ipv4_address: 10.50.0.20
profiles: ["bitcoin"]
monero:
build:
context: ./services/monero
args:
- DL_LINK=https://downloads.getmonero.org/cli/monero-linux-x64-v0.18.1.2.tar.bz2
- CHECKSUM=7d51e7072351f65d0c7909e745827cfd3b00abe5e7c4cc4c104a3c9b526da07e
depends_on:
- wireguard
cap_add:
- NET_ADMIN
environment:
- INSTALL_VPN=true
# Gateway to route traffic through. Should be equal to
# `services.wireguard.networks.wgnet.ipv4_address`.
- GATEWAY=10.50.0.10
# ADJUST: Passed on to `monerod`. Adjust according to your needs.
# Note that `--data-dir` points to the mounted volume.
- CLI_ARGS=--non-interactive --data-dir=/data --p2p-bind-port=18080 --p2p-external-port=18080
volumes:
- ./mounts/monero:/data
networks:
wgnet:
ipv4_address: 10.50.0.22
profiles: ["monero"]
networks:
wgnet:
ipam:
driver: default
config:
- subnet: "10.50.0.0/24"