From 98e4254ae9cc6c5f91bc7e7ab310b85b52111c33 Mon Sep 17 00:00:00 2001
From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com>
Date: Fri, 29 Jan 2021 17:40:36 +0100
Subject: [PATCH] feat: add ghost stack

---
 docker-compose.yml | 24 ++++++++++++++++++++++++
 template.env       |  2 ++
 2 files changed, 26 insertions(+)

diff --git a/docker-compose.yml b/docker-compose.yml
index adc818c00..6c7ead959 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -42,5 +42,29 @@ services:
       ME_CONFIG_BASICAUTH_PASSWORD: ${ME_CONFIG_BASICAUTH_PASSWORD}
       ME_CONFIG_MONGODB_SERVER: database-ram
 
+  ghost:
+    image: ghost:latest
+    restart: always
+    ports:
+      - ${GHOST_PORT}:2368
+    environment:
+      # see https://docs.ghost.org/docs/config#section-running-ghost-with-config-env-variables
+      database__client: mysql
+      database__connection__host: ghost-db
+      database__connection__user: root
+      database__connection__password: ${GHOST_DB_PASSWORD}
+      database__connection__database: ghost
+      # this url value is just an example, and is likely wrong for your environment!
+      url: http://localhost:${GHOST_PORT}
+
+  ghost-db:
+    image: mysql:5.7
+    restart: always
+    environment:
+      MYSQL_ROOT_PASSWORD: ${GHOST_DB_PASSWORD}
+    volumes:
+      - db-ghost
+
 volumes:
   db-ram:
+  db-ghost:
diff --git a/template.env b/template.env
index 4f50e814d..fa2c9d0ae 100644
--- a/template.env
+++ b/template.env
@@ -14,3 +14,5 @@ SALT=<Salt must be in the form of: $Vers$log2(NumRounds)$saltvalue>
 MAIL_URL=<API url>
 MAIL_TOKEN=<API token>
 APTIC_TOKEN=<APTIC API TOKEN>
+GHOST_PORT=<ghost port>
+GHOST_DB_PASSWORD=<ghost db password>
-- 
GitLab