From 9573d405aed0e77309e3e669f22d2a696774fcf1 Mon Sep 17 00:00:00 2001 From: VC Date: Wed, 7 May 2025 15:15:16 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8:=20add=20web4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inventory/host_vars/web4.yml | 30 +++++++++++++++++++ playbooks/webapps.yml | 7 +++++ .../templates/vhosts/koidev.mateu.be.conf.j2 | 26 ++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 inventory/host_vars/web4.yml create mode 100644 roles/nginx/templates/vhosts/koidev.mateu.be.conf.j2 diff --git a/inventory/host_vars/web4.yml b/inventory/host_vars/web4.yml new file mode 100644 index 0000000..c2d822a --- /dev/null +++ b/inventory/host_vars/web4.yml @@ -0,0 +1,30 @@ +--- +php_modules: ['opcache', 'pgsql', 'mbstring', 'gd', 'intl', 'curl', 'zip', 'apcu', 'imagick', 'bcmath', 'gmp', 'xml'] + +web_hostname: + - host: koidev.mateu.be + type: koillection + +koillection_pg_role: "koillection" +koillection_pg_database: "koillectiondb" +koillection_pg_password: !vault | + $ANSIBLE_VAULT;1.1;AES256 + 37633635646338666433353030663561343665376634356130613836316232316136333630633966 + 6430353739663831393833326532303235646531613830630a653737313261306261653935363434 + 63636334633834653237666561303663323463636332333138386563373937363664346566376431 + 3061343632343363640a313564623161323136316636306661613565353361653431643266366334 + 63633462306665386333333666313436613638333265393162383335656430646535 +koillection_app_secret: !vault | + $ANSIBLE_VAULT;1.1;AES256 + 32386264366435326136303431663564386366633664313030613133643237396566313162303162 + 3466653566313865636661343830363938333338393564380a323363323365653163646265636537 + 33373761343136666666333364333735353133343362383932623531636262663961336163303637 + 3232613062386366610a393465343637643338323633613234373262643039653336396639613766 + 32323638626166343365386438646136366130633765313734623733333432383866 +koillection_jwt_passphrase: !vault | + $ANSIBLE_VAULT;1.1;AES256 + 36353937633530626333396264353963613938306463653238633464626535346631393065386636 + 6463306331373035616436323533383332666163623033320a623033656231333239623238306462 + 61316662646161376466333862653732383030343762303637346163366266393935396335333962 + 6363346638633337370a333261316335613433356566323432356661353564373833666535626663 + 30363635333331643831626236623965663633643666666564356434303436303832 diff --git a/playbooks/webapps.yml b/playbooks/webapps.yml index 46e480b..b815821 100644 --- a/playbooks/webapps.yml +++ b/playbooks/webapps.yml @@ -36,3 +36,10 @@ roles: - role: wordpress tags: [never, wordpress] + +- name: Install dojo webapplications + hosts: web4 + diff: true + roles: + - role: koillection + tags: [never, koillection] diff --git a/roles/nginx/templates/vhosts/koidev.mateu.be.conf.j2 b/roles/nginx/templates/vhosts/koidev.mateu.be.conf.j2 new file mode 100644 index 0000000..19fa9e2 --- /dev/null +++ b/roles/nginx/templates/vhosts/koidev.mateu.be.conf.j2 @@ -0,0 +1,26 @@ +server { +{% include './templates/header.conf.j2' %} + + root /var/www/koidev.mateu.be/public; + + index index.html index.htm index.php; + + # Media: images, icons, video, audio, fonts + location ~* \.(?:jpg|jpeg|gif|png|webp|ico|svg|webm|eot|ttf|otf|woff|woff2|js|css)$ { + expires 2w; + access_log off; + } + + location / { + try_files $uri $uri/ /index.php?$query_string; + } + + location ~ [^/]\.php(/|$) { + fastcgi_split_path_info ^(.+?\.php)(/.*)$; + + try_files $uri $document_root$fastcgi_script_name =404; + + include fastcgi_params; + fastcgi_pass unix:/run/php/php{{ php_version }}-fpm.sock; + } +}