Compare commits

..

1 Commits

Author SHA1 Message Date
giles aa8bb4babb .
continuous-integration/drone/push Build is passing Details
2022-06-08 08:53:11 +01:00
6 changed files with 37 additions and 24 deletions

View File

@ -1,6 +1,4 @@
sleep 10
docker build ghost -t ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/my-ghost \
--build-arg REGISTRY=${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/ \
--build-arg REGISTRY=\ #${REGISTRY_DOMAIN}:${REGISTRY_PORT}/ \
--build-arg THEME=${THEME}

View File

@ -1,4 +1,5 @@
export LOCAL_DOCKER_REGISTRY=${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/ \
&& echo $NAME \
&& echo "scheme: ${SCHEME}" \
&& docker stack rm ghost \
&& echo 'sleeping...zzz' \

View File

@ -103,7 +103,7 @@ clone:
steps:
- name: mkdir
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
image: appleboy/drone-ssh:1.6.3
settings:
envs:
- drone_tag
@ -117,7 +117,7 @@ steps:
- rm -f /stack/.images/ghost/built/*.*
- name: alpine/git:v2.26.2
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
image: appleboy/drone-ssh:1.6.3
settings:
envs:
- drone_tag
@ -137,7 +137,7 @@ steps:
- echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/ghost/alpine/git:v2.26.2 $${DESTINATION_REGISTRY}/stack/ghost/alpine/git:v2.26.2" >> /stack/.images/ghost/load.sh
- name: ghost:3.14.0
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
image: appleboy/drone-ssh:1.6.3
settings:
envs:
- drone_tag
@ -157,7 +157,7 @@ steps:
- echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/ghost/ghost:3.14.0 $${DESTINATION_REGISTRY}/stack/ghost/ghost:3.14.0" >> /stack/.images/ghost/load.sh
- name: mysql:5.7
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
image: appleboy/drone-ssh:1.6.3
settings:
envs:
- drone_tag
@ -177,7 +177,7 @@ steps:
- echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/ghost/mysql:5.7 $${DESTINATION_REGISTRY}/stack/ghost/mysql:5.7" >> /stack/.images/ghost/load.sh
- name: my-ghost
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
image: appleboy/drone-ssh:1.6.3
settings:
envs:
- drone_tag
@ -213,7 +213,7 @@ platform:
steps:
- name: print env
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
image: appleboy/drone-ssh:1.6.3
settings:
envs:
- drone_tag
@ -221,21 +221,25 @@ steps:
- drone_build_number
- drone_repo_name
- drone_repo_namespace
- mail
- mail_service
- mail_user
- commento_origin
- theme
- mysql_root_password
script:
- rm -f env-ghost
- "echo \"export MAIL='$${MAIL}'\" >> env-ghost # \"mail\""
- "echo \"export MAIL_SERVICE='$${MAIL_SERVICE}'\" >> env-ghost # \"mail-service\""
- "echo \"export MAIL_USER='$${MAIL_USER}'\" >> env-ghost # \"mail-user\""
- "echo \"export COMMENTO_ORIGIN='$${COMMENTO_ORIGIN}'\" >> env-ghost # \"commento-origin\""
- "echo \"export THEME='$${THEME}'\" >> env-ghost # \"theme\""
- "echo \"export MYSQL_ROOT_PASSWORD='$${MYSQL_ROOT_PASSWORD}'\" >> env-ghost # \"mysql-root-password\""
environment:
COMMENTO_ORIGIN:
from_secret: commento-origin
MAIL:
from_secret: mail
MAIL_SERVICE:
from_secret: mail-service
MAIL_USER:
from_secret: mail-user
MYSQL_ROOT_PASSWORD:
from_secret: mysql-root-password
THEME:
@ -320,7 +324,7 @@ steps:
target: /stack/ghost
- name: deploy
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
image: appleboy/drone-ssh:1.6.3
settings:
envs:
- drone_tag
@ -333,16 +337,19 @@ steps:
- registry_domain
- registry_port
- registry_password
- mail
- mail_service
- mail_user
- commento_origin
- theme
- mysql_root_password
- theme
script:
- export MYSQL_ROOT_PASSWORD=$${MYSQL_ROOT_PASSWORD}
- export MAIL=$${MAIL}
- export MAIL_SERVICE=$${MAIL_SERVICE}
- export MAIL_USER=$${MAIL_USER}
- export COMMENTO_ORIGIN=$${COMMENTO_ORIGIN}
- export THEME=$${THEME}
- export THEME=$${THEME}
- export SCHEME=$${SCHEME}
- export DOMAIN=$${DOMAIN}
- export REGISTRY_DOMAIN=$${REGISTRY_DOMAIN}
@ -358,8 +365,10 @@ steps:
environment:
COMMENTO_ORIGIN:
from_secret: commento-origin
MAIL:
from_secret: mail
MAIL_SERVICE:
from_secret: mail-service
MAIL_USER:
from_secret: mail-user
MYSQL_ROOT_PASSWORD:
from_secret: mysql-root-password
THEME:

View File

@ -28,10 +28,10 @@ services:
- database__connection__database=ghost
- database__pool__min=0 # https://github.com/knex/knex/issues/975
networks:
- appnet
- externalnet
- appnet
ghost-mysql:
image: ${LOCAL_DOCKER_REGISTRY}mysql:5.7
image: ${DOCKER_REGISTRY}mysql:5.7
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack-data == yes]
@ -60,3 +60,4 @@ networks:
externalnet:
driver: overlay
external: true
name: externalnet

View File

@ -1,14 +1,17 @@
ARG REGISTRY
##ARG REGISTRY
FROM ${REGISTRY}alpine/git:v2.26.2 as git
WORKDIR /themes
ARG THEME=https://sigyl.com/git/themes/casper.git
RUN git clone ${THEME}
FROM ${REGISTRY}ghost:3.14.0
FROM ${REGISTRY}ghost:2-alpine
# USER root
RUN apt-get update
RUN apt-get install -y gettext
RUN apk update
RUN apk add gettext
COPY config.production.json.template /var/lib/ghost/
COPY --from=git /themes/ /var/lib/ghost/content/themes/

View File

@ -1,3 +1,4 @@
envsubst < /var/lib/ghost/config.production.json.template > /var/lib/ghost/config.production.json
envsubst < /hbs/post.hbs > /var/lib/ghost/content/themes/casper/post.hbs
export DEBUG=*
node "current/index.js"