mirror of
https://github.com/dragonlock2/matthewtran.com.git
synced 2025-10-11 20:17:54 +00:00
enable ipv6
This commit is contained in:
parent
0f682ba164
commit
fe653923f5
11
README.md
11
README.md
@ -24,6 +24,17 @@ Forward the following ports to the server.
|
|||||||
| terraria | 7777 |
|
| terraria | 7777 |
|
||||||
| wireguard | 51820 |
|
| wireguard | 51820 |
|
||||||
|
|
||||||
|
Make sure IPv6 is enabled in Docker by modifying `/etc/docker/daemon.json`. For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"ipv6": true,
|
||||||
|
"fixed-cidr-v6": "2001:db8:1::/64",
|
||||||
|
"experimental": true,
|
||||||
|
"ip6tables": true
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
Run the following commands. For the IP update script, add a SendGrid API key to `website/sendgrid.key`.
|
Run the following commands. For the IP update script, add a SendGrid API key to `website/sendgrid.key`.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
18
compose.yml
18
compose.yml
@ -1,3 +1,9 @@
|
|||||||
|
networks:
|
||||||
|
default6:
|
||||||
|
enable_ipv6: true
|
||||||
|
ipam:
|
||||||
|
config:
|
||||||
|
- subnet: fd3a:138e:8fd0:0001::/64
|
||||||
services:
|
services:
|
||||||
website:
|
website:
|
||||||
restart: always
|
restart: always
|
||||||
@ -6,6 +12,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
- "443:443"
|
- "443:443"
|
||||||
|
networks:
|
||||||
|
- default6
|
||||||
volumes:
|
volumes:
|
||||||
- ./website/letsencrypt:/etc/letsencrypt
|
- ./website/letsencrypt:/etc/letsencrypt
|
||||||
gitea:
|
gitea:
|
||||||
@ -13,6 +21,8 @@ services:
|
|||||||
image: gitea/gitea:latest-rootless
|
image: gitea/gitea:latest-rootless
|
||||||
ports:
|
ports:
|
||||||
- "2222:2222"
|
- "2222:2222"
|
||||||
|
networks:
|
||||||
|
- default6
|
||||||
volumes:
|
volumes:
|
||||||
- ./website/gitea/data:/var/lib/gitea
|
- ./website/gitea/data:/var/lib/gitea
|
||||||
- ./website/gitea/config:/etc/gitea
|
- ./website/gitea/config:/etc/gitea
|
||||||
@ -26,6 +36,8 @@ services:
|
|||||||
tty: true
|
tty: true
|
||||||
ports:
|
ports:
|
||||||
- "18080:18080"
|
- "18080:18080"
|
||||||
|
networks:
|
||||||
|
- default6
|
||||||
volumes:
|
volumes:
|
||||||
- ./monerod/.bitmonero:/home/matt/.bitmonero
|
- ./monerod/.bitmonero:/home/matt/.bitmonero
|
||||||
p2pool:
|
p2pool:
|
||||||
@ -38,6 +50,8 @@ services:
|
|||||||
- "3333:3333"
|
- "3333:3333"
|
||||||
- "37888:37888"
|
- "37888:37888"
|
||||||
- "37889:37889"
|
- "37889:37889"
|
||||||
|
networks:
|
||||||
|
- default6
|
||||||
volumes:
|
volumes:
|
||||||
- ./p2pool/cache:/home/matt/cache
|
- ./p2pool/cache:/home/matt/cache
|
||||||
- /dev/hugepages:/dev/hugepages
|
- /dev/hugepages:/dev/hugepages
|
||||||
@ -47,6 +61,8 @@ services:
|
|||||||
entrypoint: ["/bin/sh", "/home/matt/entry.sh"]
|
entrypoint: ["/bin/sh", "/home/matt/entry.sh"]
|
||||||
ports:
|
ports:
|
||||||
- "25565:25565"
|
- "25565:25565"
|
||||||
|
networks:
|
||||||
|
- default6
|
||||||
volumes:
|
volumes:
|
||||||
- ./minecraft/world:/home/matt/world
|
- ./minecraft/world:/home/matt/world
|
||||||
terraria:
|
terraria:
|
||||||
@ -55,5 +71,7 @@ services:
|
|||||||
entrypoint: ["/bin/sh", "/home/matt/entry.sh"]
|
entrypoint: ["/bin/sh", "/home/matt/entry.sh"]
|
||||||
ports:
|
ports:
|
||||||
- "7777:7777"
|
- "7777:7777"
|
||||||
|
networks:
|
||||||
|
- default6
|
||||||
volumes:
|
volumes:
|
||||||
- ./terraria/worlds:/home/matt/worlds
|
- ./terraria/worlds:/home/matt/worlds
|
||||||
|
@ -12,8 +12,7 @@ if __name__ == '__main__':
|
|||||||
old_ipv4, old_ipv6 = None, None
|
old_ipv4, old_ipv6 = None, None
|
||||||
while True:
|
while True:
|
||||||
ipv4 = urllib.request.urlopen('https://v4.ident.me').read().decode('utf8')
|
ipv4 = urllib.request.urlopen('https://v4.ident.me').read().decode('utf8')
|
||||||
ipv6 = None
|
ipv6 = urllib.request.urlopen('https://v6.ident.me').read().decode('utf8')
|
||||||
# ipv6 = urllib.request.urlopen('https://v6.ident.me').read().decode('utf8')
|
|
||||||
|
|
||||||
if ipv4 != old_ipv4 or ipv6 != old_ipv6:
|
if ipv4 != old_ipv4 or ipv6 != old_ipv6:
|
||||||
msg = Mail(
|
msg = Mail(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user