Added wireguard tunnel config in docker-compose and removed docker compose up from setup.sh
This commit is contained in:
parent
ff9c1fbd3b
commit
065fcc4be3
@ -22,6 +22,30 @@ services:
|
||||
networks:
|
||||
- ntfy
|
||||
|
||||
wg-easy:
|
||||
container_name: tunnel
|
||||
image: ghcr.io/wg-easy/wg-easy
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- PASSWORD_HASH=${PASS}
|
||||
- WG_HOST=${IP}
|
||||
volumes:
|
||||
- ./config:/etc/wireguard
|
||||
- /lib/modules:/lib/modules
|
||||
ports:
|
||||
- "51820:51820/udp"
|
||||
- "51821:51821/tcp"
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
- SYS_MODULE
|
||||
sysctls:
|
||||
- net.ipv4.ip_forward=1
|
||||
- net.ipv4.conf.all.src_valid_mark=1
|
||||
env_file:
|
||||
- .env
|
||||
networks:
|
||||
- ntfy
|
||||
|
||||
networks:
|
||||
ntfy:
|
||||
driver: bridge
|
||||
|
7
setup.sh
7
setup.sh
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
line="=================================="
|
||||
PROJECT_DIR=/home/$(whoami)/iot-mini
|
||||
|
||||
###############################################
|
||||
|
||||
@ -40,5 +39,7 @@ sudo apt install -y python3-requests # For notifications
|
||||
|
||||
###############################################
|
||||
|
||||
cp main.py $PROJECT_DIR/
|
||||
cd $PROJECT_DIR
|
||||
echo -e "$line\nSetting up Docker\n$line"
|
||||
./docker-setup.sh
|
||||
echo -e "$line\nDocker installation complete\n$line"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user