From 76e5aeed5f2944b3cf2873e7f0de41f996536afa Mon Sep 17 00:00:00 2001 From: M_Viper Date: Mon, 12 Feb 2024 21:05:29 +0000 Subject: [PATCH] Dateien nach "install-ghost-on-portainer" hochladen --- .../docker-compose-ghost.yml | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 install-ghost-on-portainer/docker-compose-ghost.yml diff --git a/install-ghost-on-portainer/docker-compose-ghost.yml b/install-ghost-on-portainer/docker-compose-ghost.yml new file mode 100644 index 0000000..5df3f3d --- /dev/null +++ b/install-ghost-on-portainer/docker-compose-ghost.yml @@ -0,0 +1,34 @@ +version: "3" # Use Docker Compose version 3 + +services: + ghost: + image: ghost:5.79.0-alpine # Use the Ghost Docker image + restart: on-failure # Restart the container on failure + environment: + - database__client=mysql # Set Ghost's database client to MySQL + - database__connection__host=db # Set the database host to the "db" service + - database__connection__user=ghost # Set the database user + - database__connection__password=portainer # Set the database password + - database__connection__database=ghost # Set the database name + - url=http://[YOUR_IP]:2368 # Set the base URL for the Ghost application + volumes: + - ghost-content:/var/lib/ghost/content # Mount a volume for persistent content storage + ports: + - "2368:2368" # Map port 2368 from the host to port 2368 in the container + depends_on: + - db # Ensure that the "db" service is started before the "app" service + + db: + image: mysql:8.0 # Use the MySQL Docker image + restart: on-failure # Restart the container on failure + volumes: + - mysql-data:/var/lib/mysql # Mount a volume for persistent MySQL data storage + environment: + - MYSQL_USER=ghost # Set the MySQL user + - MYSQL_DATABASE=ghost # Set the MySQL database name + - MYSQL_PASSWORD=portainer # Set the MySQL user's password + - MYSQL_ROOT_PASSWORD=portainer # Set the MySQL root password + +volumes: + ghost-content: # Define a named volume for Ghost content + mysql-data: # Define a named volume for MySQL data