diff --git a/blog-ghost.container b/blog-ghost.container new file mode 100644 index 0000000..e4545bc --- /dev/null +++ b/blog-ghost.container @@ -0,0 +1,26 @@ +[Unit] +Description=Ghost Blog Service +After=mariadb.service network-online.target +Wants=mariadb.service network-online.target + +[Container] +Image=docker.io/library/ghost:6-alpine +ContainerName=ghost +Network=blog-net.network +PublishPort=8888:2368 +Volume=/root/blog/ghost:/var/lib/ghost/content:Z +Environment=database__client=mysql +Environment=database__connection__host=mariadb +Environment=database__connection__user=ghost +Environment=database__connection__password=ghost +Environment=database__connection__database=ghost +Environment=url=https://blog.cudanet.org +Environment=server__proxy=true +Environment=security__staffDeviceVerification=false + +[Service] +Restart=always +TimeoutStartSec=900 + +[Install] +WantedBy=multi-user.target default.target diff --git a/blog-mariadb.container b/blog-mariadb.container new file mode 100644 index 0000000..31d93e3 --- /dev/null +++ b/blog-mariadb.container @@ -0,0 +1,23 @@ +[Unit] +Description=MariaDB Database Service +After=network-online.target +Wants=network-online.target + +[Container] +Image=docker.io/library/mariadb:10.6 +ContainerName=mariadb +Network=blog-net.network +Volume=/root/blog/db:/var/lib/mysql:Z +Environment=MARIADB_ROOT_PASSWORD=ghost +Environment=MARIADB_ROOT_HOST=mariadb +Environment=MARIADB_MYSQL_LOCALHOST_USER=ghost +Environment=MARIADB_DATABASE=ghost +Environment=MARIADB_USER=ghost +Environment=MARIADB_PASSWORD=ghost + +[Service] +Restart=always +TimeoutStartSec=900 + +[Install] +WantedBy=multi-user.target default.target diff --git a/blog-net.network b/blog-net.network new file mode 100644 index 0000000..ae30928 --- /dev/null +++ b/blog-net.network @@ -0,0 +1,2 @@ +[Network] +Driver=bridge