Go to file
Valentin c8c86b2ac0 correction ssh keygen 3 2024-06-07 18:05:04 +02:00
assets premier draft de import_backup 2024-05-31 15:49:11 +02:00
bin correction ssh keygen 3 2024-06-07 18:05:04 +02:00
utils correction pb de permission ç l'import des backups 2024-05-31 16:57:01 +02:00
README.md pas d'indetation avant le EOF 2024-06-07 13:53:32 +02:00
install.sh ajout du node exporter et config auto sur le host 2024-06-07 13:29:22 +02:00

README.md

Deployment DCDN Static

Deployment Debian (os) + Caddy (webserver) + Directus (cms) + Nuxt (static front).

Installation

On a fresh install as root user using

sudo passwd root

su - root

  1. Upgrade

apt update && apt upgrade -y

  1. Install git

apt install -y git

  1. Download and make the instal script executable

git clone https://gitea.valentin-le-moign.fr/val/deployment_dcdn_static

cd deployment_dcdn_static

  1. Launch the script

bash install.sh

Environment

Tested and optimised for OVH VPS Starter on Debian 12.

Installation steps

  1. Install php for the webhook
  2. Create a user
  3. Setup ssh, firewall and fail2ban
  4. Add swapfile
  5. Install Caddy webserver
  6. Install MariaDB
  7. Setup the Directus Database
  8. Install Node
  9. Prompt for the url
  10. Install and run Directus
  11. Setup backup
  12. Setup node exporter
  13. Install and run the front-end
  14. Setup a webhook

Post-install

  1. Delete unix Debian account

userdel --remove-home debian

  1. Configure DNS Zone
Domain : <domain_name>     | Type : A | Target : <ip>
Domain : cms.<domain_name> | Type : A | Target : <ip>
Domain : www.<domain_name> | Type : A | Target : <ip>
  1. Set Directus roles
Website role   Read content collections and directus_files
User role      All permissions on content collections, directus_files and directus_folders
  1. Create a webhook <repo_url>/settings/hooks/gitea/new
Target URL             https://<domain_name>/webhook.php
Branch filter          prod
Authorization Header   generate a safe string using : openssl rand -base64 32
  1. Setup Matomo tracking

Add a new website to track from the Matomo interface as an admin user

All website → Add a new Website → Website

Ref

Debian Web Server

Securing a dedicated server