Go to file
Valentin 41378a31c6 start modularisation 2024-05-02 23:54:06 +02:00
assets start modularisation 2024-05-02 23:54:06 +02:00
bin start modularisation 2024-05-02 23:54:06 +02:00
utils import directus db 4 pas possible de supprimer l'user debian sans être kick 2024-04-17 17:35:05 +02:00
README.md nuxt generate 1 2024-04-18 12:47:12 +02:00
install.sh start modularisation 2024-05-02 23:54:06 +02:00
install_modulaire.sh start modularisation 2024-05-02 23:54:06 +02:00

README.md

Deployment DCDN

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://figureslibres.io/gitea/valentin_le_moign/deployment-dcdn.git

cd deployment-dcdn

chmod u+x install.sh

  1. Launch the script

bash install.sh

Installation steps

  1. Install php for the webhook
  2. Create a user
  3. Setup ssh, firewall and fail2ban
  4. Install Caddy webserver
  5. Install MariaDB
  6. Setup the Directus Database
  7. Install Node
  8. Prompt for the url
  9. Install and run Directus
  10. Install and run the front-end
  11. 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

Ref

Debian Web Server

Securing a dedicated server