Dateien nach "install-ghost-on-portainer" hochladen

This commit is contained in:
M_Viper 2024-02-12 21:05:29 +00:00
parent 1aa3d511e5
commit 76e5aeed5f
1 changed files with 34 additions and 0 deletions

View File

@ -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