From 9128610f431c8a6973aa660b7ea73e55a74967ac Mon Sep 17 00:00:00 2001 From: Kacper Donat Date: Sun, 24 Oct 2021 21:31:01 +0200 Subject: [PATCH] shitcode: Add shitcode config --- services/legacy/sites/shitcode.conf | 19 +++++++++++++++++++ services/legacy/stack.yml | 2 ++ services/traefik/config/dynamic/shitcode.yaml | 8 ++++++++ vars/databases.yml | 1 + 4 files changed, 30 insertions(+) create mode 100644 services/legacy/sites/shitcode.conf create mode 100644 services/traefik/config/dynamic/shitcode.yaml diff --git a/services/legacy/sites/shitcode.conf b/services/legacy/sites/shitcode.conf new file mode 100644 index 0000000..53b3926 --- /dev/null +++ b/services/legacy/sites/shitcode.conf @@ -0,0 +1,19 @@ +server { + listen 80; + root /var/www/shitcode.net/web/; + server_name shitcode.net; + + index index.php; + + location / { + try_files $uri $uri/ /index.php?$args; + } + + # pass the PHP scripts to FastCGI server listening on php-71:9000 x + location ~ \.php$ { + fastcgi_pass php-71:9000; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } +} diff --git a/services/legacy/stack.yml b/services/legacy/stack.yml index 4c4fcf7..d9f1a4b 100644 --- a/services/legacy/stack.yml +++ b/services/legacy/stack.yml @@ -17,6 +17,8 @@ services: {% for version in php_versions %} php-{{ version|replace('.', '') }}: image: kadet/php:{{ version }} + environment: + - MYSQL_HOST={{ database_mysql_host }}:3306 volumes: - "{{ www_root }}:/var/www" {% endfor %} diff --git a/services/traefik/config/dynamic/shitcode.yaml b/services/traefik/config/dynamic/shitcode.yaml new file mode 100644 index 0000000..bedc92e --- /dev/null +++ b/services/traefik/config/dynamic/shitcode.yaml @@ -0,0 +1,8 @@ +--- +http: + routers: + shitcode: + rule: Host(`shitcode.net`) + service: legacy@docker + tls: + certresolver: lets-encrypt diff --git a/vars/databases.yml b/vars/databases.yml index 3ceff35..30c1371 100644 --- a/vars/databases.yml +++ b/vars/databases.yml @@ -11,6 +11,7 @@ mysql_databases: - name: gitea - name: wipe - name: keylighter + - name: shitcode mysql_users: - name: gitea