From a182a704e2ee9ac618170eb0aebda4a38c56d147 Mon Sep 17 00:00:00 2001 From: Keith Irwin Date: Sun, 4 Dec 2022 09:05:51 -0700 Subject: [PATCH] Moved docker-compose.yml to .sample --- .gitignore | 1 + back/lib/fed/peer/add | 1 + back/lib/fed/peer/del | 1 + docker-compose.yml.sample | 69 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 72 insertions(+) create mode 100644 docker-compose.yml.sample diff --git a/.gitignore b/.gitignore index dba9793..9cc5b98 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ etc/config etc/servers +docker-compose.yml \ No newline at end of file diff --git a/back/lib/fed/peer/add b/back/lib/fed/peer/add index efe1a42..d3721ec 100755 --- a/back/lib/fed/peer/add +++ b/back/lib/fed/peer/add @@ -31,4 +31,5 @@ else printf 'ERROR! Failed to add %s to wireguard!\n' "${pubkey}" >&2 /usr/lib/wgapi/http_res 500; exit fi + /usr/lib/wgapi/http_res 200 diff --git a/back/lib/fed/peer/del b/back/lib/fed/peer/del index 3a518ea..7053c21 100755 --- a/back/lib/fed/peer/del +++ b/back/lib/fed/peer/del @@ -29,4 +29,5 @@ else printf 'ERROR! Failed to delete %s from wireguard!\n' "${pubkey}" >&2 /usr/lib/wgapi/http_res 500; exit fi + /usr/lib/wgapi/http_res 200 \ No newline at end of file diff --git a/docker-compose.yml.sample b/docker-compose.yml.sample new file mode 100644 index 0000000..71fae65 --- /dev/null +++ b/docker-compose.yml.sample @@ -0,0 +1,69 @@ +version: '3' +networks: + wgapi: + name: wgapi + ipam: + config: + - subnet: "172.19.0.0/16" +services: + + dashboard-backend: + build: + context: back + dockerfile: dashboard.Dockerfile + args: + PORT: 4442 + container_name: wgapi-dashboard-backend + cap_add: + - NET_ADMIN + network_mode: host + volumes: + - '/etc/ssl/private:/etc/ssl/private' + - './etc:/etc/wgapi:ro' + - '/var/log/wgapi.log:/var/log/apache2/error.log' + + dashboard-frontend: + build: + context: front + dockerfile: dashboard.Dockerfile + container_name: wgapi-dashboard-frontend + networks: + wgapi: + ipv4_address: 172.19.0.2 + + admin-backend: + build: + context: back + dockerfile: admin.Dockerfile + args: + PORT: 4441 + cap_add: + - NET_ADMIN + network_mode: host + container_name: wgapi-admin-backend + volumes: + - '/var/log/wgapi.log:/var/log/apache2/error.log' + - '/etc/ssl/private:/etc/ssl/private' + - './etc:/etc/wgapi:ro' + + admin-frontend: + build: + context: front + dockerfile: admin.Dockerfile + container_name: wgapi-admin-frontend + networks: + wgapi: + ipv4_address: 172.19.0.3 + + fed-backend: + build: + context: back + dockerfile: fed.Dockerfile + args: + PORT: 4443 + cap_add: + - NET_ADMIN + network_mode: host + container_name: wgapi-fed-backend + volumes: + - '/var/log/wgapi.log:/var/log/apache2/error.log'