From 1aa3d511e5eb5e46d490d5dcc49b8103df2105d6 Mon Sep 17 00:00:00 2001 From: M_Viper Date: Mon, 12 Feb 2024 21:04:50 +0000 Subject: [PATCH] Dateien nach "install-ghost-on-docker" hochladen --- install-ghost-on-docker/docker-compose.yml | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 install-ghost-on-docker/docker-compose.yml diff --git a/install-ghost-on-docker/docker-compose.yml b/install-ghost-on-docker/docker-compose.yml new file mode 100644 index 0000000..25ca5a8 --- /dev/null +++ b/install-ghost-on-docker/docker-compose.yml @@ -0,0 +1,49 @@ +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=dockge # 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 + # Define the networks section + networks: + # Define the pihole-network + - ghost-network + + 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=dockge # Set the MySQL user's password + - MYSQL_ROOT_PASSWORD=dockge # Set the MySQL root password + # Define the networks section + networks: + # Define the pihole-network + - ghost-network + +# Define the networks section +networks: + # Define the pihole-network + ghost-network: + # Set the driver to bridge + driver: bridge + +volumes: + ghost-content: # Define a named volume for Ghost content + mysql-data: # Define a named volume for MySQL data