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 \ 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} --build-arg THEME=${THEME}

View File

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

View File

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

View File

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

View File

@ -1,14 +1,17 @@
ARG REGISTRY
##ARG REGISTRY
FROM ${REGISTRY}alpine/git:v2.26.2 as git FROM ${REGISTRY}alpine/git:v2.26.2 as git
WORKDIR /themes WORKDIR /themes
ARG THEME=https://sigyl.com/git/themes/casper.git ARG THEME=https://sigyl.com/git/themes/casper.git
RUN git clone ${THEME} RUN git clone ${THEME}
FROM ${REGISTRY}ghost:3.14.0 FROM ${REGISTRY}ghost:2-alpine
# USER root # 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 config.production.json.template /var/lib/ghost/
COPY --from=git /themes/ /var/lib/ghost/content/themes/ 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 < /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 envsubst < /hbs/post.hbs > /var/lib/ghost/content/themes/casper/post.hbs
export DEBUG=*
node "current/index.js" node "current/index.js"