Créer ce site

Ce blog fonctionne avec Ghost, une plateforme légère et rapide conçue pour publier du contenu facilement.
Il est hébergé sur un VPS, ce qui me donne plus de contrôle et de flexibilité. J’utilise Docker pour simplifier l’installation, et NGINX comme reverse proxy pour sécuriser le site avec HTTPS et gérer les connexions.
Le nom de domaine jlap.ca
pointe vers ce serveur.
Créer un fichier docker-compose.yml pour Ghost + MariaDB
version: '3.8'
services:
mariadb:
image: mariadb:10.11
container_name: ghost-mariadb
restart: always
environment:
MYSQL_ROOT_PASSWORD: strongpassword
MYSQL_DATABASE: ghost
MYSQL_USER: ghost
MYSQL_PASSWORD: ghostpass
volumes:
- mariadb-data:/var/lib/mysql
networks:
- web
ghost:
image: ghost:5-alpine
container_name: ghost
restart: always
depends_on:
- mariadb
environment:
database__client: mysql
database__connection__host: mariadb
database__connection__user: ghost
database__connection__password: ghostpass
database__connection__database: ghost
url: https://jlap.ca
volumes:
- ghost-content:/var/lib/ghost/content
networks:
- web
expose:
- "2368"
volumes:
ghost-content:
mariadb-data:
networks:
web:
external: true
docker compose up -d
Configurer NGINX
Installer
sudo apt update
sudo apt install nginx -y
Créer le fichier de configuration NGINX
sudo nano /etc/nginx/sites-available/ghost
Contenu du fichier :
server {
listen 80;
server_name jlap.ca;
location / {
proxy_pass http://localhost:2368;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Puis activer le site :
sudo ln -s /etc/nginx/sites-available/ghost /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
Obtenir un certificat SSL avec Certbot
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d jlap.ca
🌐 Accède maintenant à ton blog sur : https://jlap.ca