diff --git a/docker-compose.yaml b/docker-compose.yaml index 850e78d..907a760 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -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 diff --git a/setup.sh b/setup.sh index efc6d3a..1922095 100644 --- a/setup.sh +++ b/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" +