From 01419396a673016bc27a9ec6a41a1f3226293007 Mon Sep 17 00:00:00 2001 From: Tord-Vincent Heggland Date: Sun, 15 Mar 2026 22:47:30 +0100 Subject: [PATCH] fistnettside --- docker-compose.yaml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 docker-compose.yaml diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..9421ce9 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,42 @@ +services: + db: + image: mariadb:11 + container_name: blogg_db + restart: unless-stopped + environment: + MARIADB_ROOT_PASSWORD: rootpass123 + MARIADB_DATABASE: ghost + MARIADB_USER: ghost + MARIADB_PASSWORD: ghostpass123 + command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci + volumes: + - db_data:/var/lib/mysql + healthcheck: + test: ["CMD", "mariadb-admin", "ping", "-h", "localhost", "-prootpass123"] + interval: 10s + timeout: 5s + retries: 20 + + ghost: + image: ghost:5-alpine + container_name: blogg_ghost + restart: unless-stopped + depends_on: + db: + condition: service_healthy + ports: + - "8080:2368" + environment: + url: http://localhost:8080 + database__client: mysql + database__connection__host: db + database__connection__port: 3306 + database__connection__user: ghost + database__connection__password: ghostpass123 + database__connection__database: ghost + volumes: + - ghost_data:/var/lib/ghost/content + +volumes: + db_data: + ghost_data: