From 20a8392ee7e52cacf6e4723f70dac3da486c12db Mon Sep 17 00:00:00 2001 From: Kacper Donat Date: Mon, 5 Apr 2021 22:15:03 +0200 Subject: [PATCH] Add static services config --- .vscode/settings.json | 5 +-- init.yaml => main.yaml | 0 services/legacy/sites/alcoholic.conf | 10 +++++ services/legacy/sites/default.conf | 41 ++----------------- services/legacy/sites/paa.conf | 10 +++++ services/legacy/sites/pastebin.conf | 2 +- .../config/dynamic/alcoholic-calendar.yaml | 6 +++ services/traefik/config/dynamic/paa.yaml | 6 +++ 8 files changed, 37 insertions(+), 43 deletions(-) rename init.yaml => main.yaml (100%) create mode 100644 services/legacy/sites/alcoholic.conf create mode 100644 services/legacy/sites/paa.conf create mode 100644 services/traefik/config/dynamic/alcoholic-calendar.yaml create mode 100644 services/traefik/config/dynamic/paa.yaml diff --git a/.vscode/settings.json b/.vscode/settings.json index eb2113c..2a7a120 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,12 +1,9 @@ { "yaml.schemaStore.enable": false, "yaml.schemas": { - "https://json.schemastore.org/ansible-playbook": [ - "${workspaceFolder}/*.yaml", - ], "https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json": [ "/services/*/stack.yml" ] }, - "yaml.customTags": ["!vault"] + "yaml.customTags": ["!vault scalar"] } diff --git a/init.yaml b/main.yaml similarity index 100% rename from init.yaml rename to main.yaml diff --git a/services/legacy/sites/alcoholic.conf b/services/legacy/sites/alcoholic.conf new file mode 100644 index 0000000..f974661 --- /dev/null +++ b/services/legacy/sites/alcoholic.conf @@ -0,0 +1,10 @@ +server { + listen 80; + index index.html index.htm; + + server_name alcoholic.{{ main_domain }}; + + location / { + root /var/www/alcoholic.kadet.net/; + } +} diff --git a/services/legacy/sites/default.conf b/services/legacy/sites/default.conf index 14d2504..56e4245 100644 --- a/services/legacy/sites/default.conf +++ b/services/legacy/sites/default.conf @@ -1,43 +1,8 @@ server { - listen 80; - - #charset koi8-r; - #access_log /var/log/nginx/host.access.log main; + listen 80; + index index.html index.htm; location / { - root /usr/share/nginx/html; - index index.html index.htm; + root /var/www/kadet.net/; } - - #error_page 404 /404.html; - - # redirect server error pages to the static page /50x.html - # - error_page 500 502 503 504 /50x.html; - location = /50x.html { - root /usr/share/nginx/html; - } - - # proxy the PHP scripts to Apache listening on 127.0.0.1:80 - # - #location ~ \.php$ { - # proxy_pass http://127.0.0.1; - #} - - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # - #location ~ \.php$ { - # root html; - # fastcgi_pass 127.0.0.1:9000; - # fastcgi_index index.php; - # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; - # include fastcgi_params; - #} - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} } diff --git a/services/legacy/sites/paa.conf b/services/legacy/sites/paa.conf new file mode 100644 index 0000000..a989139 --- /dev/null +++ b/services/legacy/sites/paa.conf @@ -0,0 +1,10 @@ +server { + listen 80; + index index.html index.htm; + + server_name paa.{{ main_domain }}; + + location / { + root /var/www/paa.kadet.net/; + } +} diff --git a/services/legacy/sites/pastebin.conf b/services/legacy/sites/pastebin.conf index 3fdbb2d..c5afbe1 100644 --- a/services/legacy/sites/pastebin.conf +++ b/services/legacy/sites/pastebin.conf @@ -1,6 +1,6 @@ server { listen 80; - root /var/www/pastebin/current/web/; + root /var/www/bin.kadet.net/current/web/; server_name bin.{{ main_domain }}; index index.php; diff --git a/services/traefik/config/dynamic/alcoholic-calendar.yaml b/services/traefik/config/dynamic/alcoholic-calendar.yaml new file mode 100644 index 0000000..af1c2b5 --- /dev/null +++ b/services/traefik/config/dynamic/alcoholic-calendar.yaml @@ -0,0 +1,6 @@ +--- +http: + routers: + alcoholic-calendar: + rule: Host(`alcoholic.{{ main_domain }}`) + service: legacy@docker diff --git a/services/traefik/config/dynamic/paa.yaml b/services/traefik/config/dynamic/paa.yaml new file mode 100644 index 0000000..a41981c --- /dev/null +++ b/services/traefik/config/dynamic/paa.yaml @@ -0,0 +1,6 @@ +--- +http: + routers: + paa: + rule: Host(`paa.{{ main_domain }}`) + service: legacy@docker