Custom build wg-easy

This commit is contained in:
Nicolas Meienberger 2022-04-14 19:12:46 +02:00
parent c90cd28488
commit 2bf8c374f6
17 changed files with 14638 additions and 180 deletions

11
apps/busybox/config.json Normal file
View file

@ -0,0 +1,11 @@
{
"name": "BusyBox",
"port": 3000,
"id": "busybox",
"description": "",
"short_desc": "",
"author": "",
"source": "",
"image": "https://raw.githubusercontent.com/docker-library/docs/cc5d5e47fd7e0c57c9b8de4c1bfb6258e0dac85d/busybox/logo.png",
"form_fields": {}
}

View file

@ -0,0 +1,6 @@
version: "3.7"
services:
test:
image: meienberger/ubuntu-test
networks:
- tipi_main_network

View file

@ -14,7 +14,7 @@ services:
filerun:
container_name: filerun
image: filerun/filerun
image: filerun/filerun:arm64v8
environment:
FR_DB_HOST: filerun-db
FR_DB_PORT: 3306
@ -36,4 +36,3 @@ services:
- ${ROOT_FOLDER}/app-data:/user-files
networks:
- tipi_main_network

View file

@ -7,7 +7,6 @@
"author": "",
"source": "",
"image": "https://avatars.githubusercontent.com/u/25025331?s=200&v=4",
"dependencies": ["transmission"],
"form_fields": {
"torrent-client": {
"type": "text",
@ -16,14 +15,6 @@
"min": 3,
"required": true,
"env_variable": "TORRENT_CLIENT"
},
"test": {
"type": "text",
"label": "testvar",
"max": 50,
"min": 3,
"required": true,
"env_variable": "TEST_VAR"
}
}
}

View file

@ -6,7 +6,7 @@ services:
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/London
- TZ=${TZ}
- AUTO_UPDATE=true
volumes:
- ${APP_DATA_DIR}/data/config:/config

View file

@ -1,8 +0,0 @@
version: '3.7'
services:
test:
build:
context: .
dockerfile: Dockerfile
networks:
- tipi_main_network

View file

@ -12,7 +12,7 @@
"image": "https://avatars.githubusercontent.com/u/13991055?s=200&v=4",
"form_fields": {
"host": {
"type": "ip",
"type": "fqdnip",
"label": "Your public IP address or domain name",
"required": true,
"env_variable": "WIREGUARD_HOST"

View file

@ -1,29 +1,32 @@
version: '3.7'
version: "3.7"
services:
wg-easy:
container_name: wg-easy
image: 'weejewel/wg-easy:latest'
restart: unless-stopped
volumes:
- ${APP_DATA_DIR}:/etc/wireguard
ports:
- 51820:51820
- ${APP_PORT}:51821
environment:
WG_HOST: '${WIREGUARD_HOST}'
PASSWORD: '${WIREGUARD_PASSWORD}'
cap_add:
- NET_ADMIN
- SYS_MODULE
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
- net.ipv4.ip_forward=1
networks:
- tipi_main_network
# labels:
# traefik.enable: true
# traefik.http.routers.wireguard.rule: Host(`wireguard.tipi.home`)
# traefik.http.routers.wireguard.service: wireguard
# traefik.http.routers.wireguard.tls: true
# traefik.http.routers.wireguard.entrypoints: websecure
# traefik.http.services.wireguard.loadbalancer.server.port: 51821
container_name: wg-easy
image: "meienberger/wg-easy:latest"
restart: unless-stopped
network_mode: "host"
volumes:
- ${APP_DATA_DIR}:/etc/wireguard
- /lib/modules:/lib/modules
ports:
- 51820:51820/udp
- ${APP_PORT}:51821
environment:
WG_HOST: "${WIREGUARD_HOST}"
PASSWORD: "${WIREGUARD_PASSWORD}"
WG_DEFAULT_DNS: 8.8.8.8
WG_ALLOWED_IPS: 0.0.0.0/0,::/0
WG_FWMARK: 51820
cap_add:
- NET_ADMIN
- SYS_MODULE
# sysctls:
# - net.ipv4.conf.all.src_valid_mark=1
# - net.ipv4.ip_forward=1
# labels:
# traefik.enable: true
# traefik.http.routers.wireguard.rule: Host(`wireguard.tipi.home`)
# traefik.http.routers.wireguard.service: wireguard
# traefik.http.routers.wireguard.tls: true
# traefik.http.routers.wireguard.entrypoints: websecure
# traefik.http.services.wireguard.loadbalancer.server.port: 51821

View file

@ -19,6 +19,8 @@ export const validateAppConfig = (values: Record<string, string>, fields: (AppCo
errors[field.id] = 'Field must be a valid domain';
} else if (values[field.id] && field.type === FieldTypes.ip && !validator.isIP(values[field.id])) {
errors[field.id] = 'Field must be a valid IP address';
} else if (values[field.id] && field.type === FieldTypes.fqdnip && !validator.isFQDN(values[field.id] || '') && !validator.isIP(values[field.id])) {
errors[field.id] = 'Field must be a valid domain or IP address';
}
});

View file

@ -1,6 +1,6 @@
import axios, { Method } from 'axios';
const BASE_URL = 'http://localhost:3001';
export const BASE_URL = 'http://192.168.2.146:3001';
interface IFetchParams {
endpoint: string;

View file

@ -1,8 +1,9 @@
import { BareFetcher } from 'swr';
import axios from 'axios';
import { BASE_URL } from './api';
const fetcher: BareFetcher<any> = (url: string) => {
return axios.get(url, { baseURL: 'http://localhost:3001' }).then((res) => res.data);
return axios.get(url, { baseURL: BASE_URL }).then((res) => res.data);
};
export default fetcher;

View file

@ -5,6 +5,7 @@ export enum FieldTypes {
number = 'number',
fqdn = 'fqdn',
ip = 'ip',
fqdnip = 'fqdnip',
}
interface FormField {

View file

@ -118,7 +118,7 @@ fi
# Removes images and destroys all data for an app
if [[ "$command" = "uninstall" ]]; then
echo "Removing images for app ${app}..."
compose "${app}" down --rmi all --remove-orphans
compose "${app}" down --remove-orphans
echo "Deleting app data for app ${app}..."
if [[ -d "${app_data_dir}" ]]; then

View file

@ -1 +1 @@
{"installed":" transmission filerun anonaddy","environment":{"anonaddy":{}}}
{"installed":"transmission wg-easy jellyfin radarr filerun nextcloud busybox","environment":{"anonaddy":{}}}

File diff suppressed because it is too large Load diff

View file

@ -1 +1 @@
export const appNames = ['nextcloud', 'freshrss', 'anonaddy', 'filerun', 'wg-easy', 'radarr', 'transmission', 'jellyfin', 'pi-hole'];
export const appNames = ['nextcloud', 'freshrss', 'anonaddy', 'filerun', 'wg-easy', 'radarr', 'transmission', 'jellyfin', 'pi-hole', 'busybox'];