mirror of
https://github.com/blasseye/WikiJs.git
synced 2025-10-09 12:15:07 +02:00
Compare commits
9 commits
35c1d78699
...
ce8851c603
Author | SHA1 | Date | |
---|---|---|---|
ce8851c603 | |||
9730d194db | |||
713a005a82 | |||
de925af6c5 | |||
f1cf956dd4 | |||
c65a15f1c9 | |||
37ae5fb077 | |||
b95b1d3a06 | |||
8466a0eb42 |
1 changed files with 160 additions and 0 deletions
160
applications/ghost.md
Normal file
160
applications/ghost.md
Normal file
|
@ -0,0 +1,160 @@
|
||||||
|
---
|
||||||
|
title: Ghost
|
||||||
|
description: Ghost est un CMS open-source, rapide et moderne, orienté blogging et publication de contenu.
|
||||||
|
published: true
|
||||||
|
date: 2025-08-28T18:51:01.848Z
|
||||||
|
tags:
|
||||||
|
editor: markdown
|
||||||
|
dateCreated: 2025-08-28T18:07:31.592Z
|
||||||
|
---
|
||||||
|
|
||||||
|
Ce guide décrit comment déployer Ghost dans un environnement conteneurisé avec **Docker Compose**, en utilisant une base de données **MySQL** et un reverse proxy **Traefik** pour la gestion du HTTPS.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Arborescence du projet
|
||||||
|
|
||||||
|
```
|
||||||
|
ghost/
|
||||||
|
│── docker-compose.yml
|
||||||
|
│── content/ # Contenu Ghost (thèmes, images, config)
|
||||||
|
│── db/ # Données MySQL
|
||||||
|
│── .env # Variables d’environnement
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Fichier `docker-compose.yml`
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
services:
|
||||||
|
|
||||||
|
ghost:
|
||||||
|
image: ghost:alpine
|
||||||
|
container_name: ${SERVICE}
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
database__client: mysql
|
||||||
|
database__connection__host: ${SERVICE}_db
|
||||||
|
database__connection__user: ${MYSQL_USER}
|
||||||
|
database__connection__password: ${MYSQL_PASSWORD}
|
||||||
|
database__connection__database: ${MYSQL_DATABASE}
|
||||||
|
mail__transport: "SMTP"
|
||||||
|
mail__from: ${MAIL_FROM}
|
||||||
|
mail__options__host: ${MAIL_HOST}
|
||||||
|
mail__options__port: ${MAIL_PORT}
|
||||||
|
mail__options__secure: ${MAIL_SECURE}
|
||||||
|
mail__options__auth__user: ${MAIL_SECURE}
|
||||||
|
mail__options__auth__pass: ${MAIL_PASS}
|
||||||
|
url: "https://${DOMAIN}/"
|
||||||
|
volumes:
|
||||||
|
- ./content:/var/lib/ghost/content
|
||||||
|
networks:
|
||||||
|
- traefik_net
|
||||||
|
- ghost_net
|
||||||
|
depends_on:
|
||||||
|
- ghost_db
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.${SERVICE}.rule=Host(`${DOMAIN}`)"
|
||||||
|
- "traefik.http.routers.${SERVICE}.entrypoints=websecure"
|
||||||
|
- "traefik.http.routers.${SERVICE}.tls=true"
|
||||||
|
- "traefik.http.routers.${SERVICE}.tls.certresolver=http"
|
||||||
|
- "traefik.http.routers.${SERVICE}.service=ghost"
|
||||||
|
- "traefik.http.services.${SERVICE}.loadbalancer.server.port=2368"
|
||||||
|
- "traefik.docker.network=traefik_net"
|
||||||
|
|
||||||
|
ghost_db:
|
||||||
|
image: mysql:8
|
||||||
|
container_name: ${SERVICE}_db
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
|
||||||
|
MYSQL_USER: ${MYSQL_USER}
|
||||||
|
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
||||||
|
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
||||||
|
volumes:
|
||||||
|
- ./db:/var/lib/mysql
|
||||||
|
networks:
|
||||||
|
- ghost_net
|
||||||
|
|
||||||
|
networks:
|
||||||
|
traefik_net:
|
||||||
|
external: true
|
||||||
|
ghost_net:
|
||||||
|
name: ${SERVICE}_net
|
||||||
|
driver: bridge
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Variables d’environnement (`.env`)
|
||||||
|
|
||||||
|
Exemple de fichier `.env` :
|
||||||
|
|
||||||
|
```env
|
||||||
|
SERVICE=ghost_blog
|
||||||
|
|
||||||
|
# Domaine
|
||||||
|
DOMAIN=blog.example.com
|
||||||
|
|
||||||
|
# Base de données
|
||||||
|
MYSQL_ROOT_PASSWORD=superpassword
|
||||||
|
MYSQL_USER=ghost
|
||||||
|
MYSQL_PASSWORD=ghostpass
|
||||||
|
MYSQL_DATABASE=ghostdb
|
||||||
|
|
||||||
|
# Mail (SMTP)
|
||||||
|
MAIL_FROM="Ghost Blog <noreply@example.com>"
|
||||||
|
MAIL_HOST=smtp.example.com
|
||||||
|
MAIL_PORT=587
|
||||||
|
MAIL_SECURE=false
|
||||||
|
MAIL_USER=smtp_user
|
||||||
|
MAIL_PASS=smtp_pass
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Déploiement
|
||||||
|
|
||||||
|
1. Placez vous dans le dossier `ghost/`.
|
||||||
|
|
||||||
|
2. Lancez le déploiement :
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Vérifiez que les conteneurs tournent :
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker ps
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Accès
|
||||||
|
|
||||||
|
* L’interface Ghost sera disponible à :
|
||||||
|
**[https://blog.example.com](https://blog.example.com)**
|
||||||
|
|
||||||
|
* L’administration est accessible via :
|
||||||
|
**[https://blog.example.com/ghost](https://blog.example.com/ghost)**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Points importants
|
||||||
|
|
||||||
|
* **Sauvegardes** :
|
||||||
|
|
||||||
|
* `./content` contient tous les fichiers Ghost (images, thèmes, config).
|
||||||
|
* `./db` contient la base de données MySQL.
|
||||||
|
* **Traefik** gère automatiquement les certificats SSL via Let’s Encrypt.
|
||||||
|
* **Scalabilité** : Ghost est prévu pour un usage monolithique, mais peut être déployé derrière un load balancer.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Conclusion
|
||||||
|
|
||||||
|
Avec cette configuration, vous disposez d’un **CMS Ghost auto-hébergé**, sécurisé avec HTTPS grâce à **Traefik**, et supportant une **base MySQL persistante**.
|
||||||
|
Idéal pour héberger un blog personnel ou professionnel tout en gardant la maîtrise complète de vos données.
|
Loading…
Add table
Add a link
Reference in a new issue