From 039dfe2b24abd439e4c82bf37abe679898b65468 Mon Sep 17 00:00:00 2001 From: giles Date: Wed, 18 Sep 2024 14:32:16 +0000 Subject: [PATCH] .. --- .gitignore | 1 + Dockerfile | 1 + docker-compose.yml | 16 +++++++++++++++- log-rotate | 6 ++++++ 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 log-rotate diff --git a/.gitignore b/.gitignore index 6f396ba..8a7311e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ .db-password .db-root-password .env +themes diff --git a/Dockerfile b/Dockerfile index 1dbc9a2..4da63cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ FROM ghost:alpine RUN apk update && apk add gettext COPY config.production.template /var/lib/ghost/ +COPY log-rotate /etc/logrotate.d/ghost COPY run.sh . CMD ["sh", "./run.sh"] diff --git a/docker-compose.yml b/docker-compose.yml index 6ee2293..0b212db 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,16 +3,30 @@ services: ghost: image: rose-ash-ghost:latest environment: - url: https://roseash.info/ + url: https://rose-ash.com/ NODE_ENV: production volumes: - ghost-content:/var/lib/ghost/content + - ./themes/:/var/lib/ghost/content/themes networks: - appnet - externalnet secrets: - email - db-password + invite-token: + image: invite-token + environment: + MYSQL_USER: ghost + MYSQL_PASSWORD: ghostdbpass + MYSQL_DATABASE: ghostdb + MYSQL_HOST: db + PORT: 3002 + networks: + - appnet + - externalnet + #ports: + # - 3002:3002 db: image: rose-ash-mysql:latest diff --git a/log-rotate b/log-rotate new file mode 100644 index 0000000..85961fc --- /dev/null +++ b/log-rotate @@ -0,0 +1,6 @@ +/var/www/ghost/content/logs/*.log { + weekly + rotate 12 + compress + copytruncate +}