Compare commits

...

15 Commits

Author SHA1 Message Date
Giles Bradshaw 46708efd97 fix: password in quotes
continuous-integration/drone/push Build is passing Details
2020-10-06 20:06:13 +01:00
Giles Bradshaw 25df04bfdd .
continuous-integration/drone/push Build is passing Details
2020-10-05 12:01:39 +01:00
Giles Bradshaw 16eb8c9877 .
continuous-integration/drone/push Build is passing Details
continuous-integration/drone Build is passing Details
2020-10-05 11:43:54 +01:00
Giles Bradshaw a18704e642 .
continuous-integration/drone/push Build is passing Details
continuous-integration/drone Build is passing Details
2020-10-05 11:30:42 +01:00
Giles Bradshaw 54b0578cd7 .
continuous-integration/drone/push Build is passing Details
2020-10-05 11:29:13 +01:00
Giles Bradshaw 4713775251 .
continuous-integration/drone/push Build is passing Details
2020-10-05 11:27:16 +01:00
Giles Bradshaw 13b30dac5a .
continuous-integration/drone/push Build is passing Details
2020-10-05 11:17:27 +01:00
Giles Bradshaw 5ecb4b791d .
continuous-integration/drone/push Build is passing Details
2020-10-04 19:58:39 +01:00
Giles Bradshaw 3174aa4ca9 .
continuous-integration/drone/push Build is passing Details
2020-10-04 19:56:10 +01:00
Giles Bradshaw 3dba493af8 .
continuous-integration/drone/push Build is passing Details
2020-10-04 19:55:40 +01:00
Giles Bradshaw 36554b6c0d .
continuous-integration/drone/push Build is passing Details
2020-10-04 19:55:36 +01:00
Giles Bradshaw 6fca346e3b .
continuous-integration/drone/push Build is passing Details
2020-10-04 19:55:31 +01:00
Giles Bradshaw 42b6fca723 .
continuous-integration/drone/push Build is passing Details
2020-10-04 19:54:44 +01:00
Giles Bradshaw f1d3ede97c .
continuous-integration/drone/push Build is passing Details
2020-10-04 19:53:30 +01:00
Giles Bradshaw f69bda2e8e .
continuous-integration/drone/push Build is passing Details
2020-10-04 19:50:40 +01:00
9 changed files with 47 additions and 11 deletions

View File

@ -1,3 +1,3 @@
docker build ghost -t ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/ghost \ docker build ghost -t ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/my-ghost \
--build-arg REGISTRY=${REGISTRY_DOMAIN}:${REGISTRY_PORT}/ --build-arg REGISTRY=${REGISTRY_DOMAIN}:${REGISTRY_PORT}/

View File

@ -30,7 +30,7 @@ steps:
commands: commands:
- set -e - set -e
- export REGISTRY=$${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/ - export REGISTRY=$${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/
- sh .drone/scripts/initialise-images.sh $${REGISTRY} $${REGISTRY_PASSWORD} - sh .drone/scripts/initialise-images.sh $${REGISTRY} "$${REGISTRY_PASSWORD}"
volumes: volumes:
- name: dockersock - name: dockersock
path: /var/run path: /var/run
@ -83,16 +83,32 @@ steps:
- mail_service - mail_service
- mail_user - mail_user
- commento_origin - commento_origin
- ghost_mail_password
- ghost_mail_service
- ghost_mail_user
- ghost_mysql_root_password
- mysql_root_password - mysql_root_password
script: script:
- rm -f env-ghost - rm -f env-ghost
- "echo \"export MAIL_SERVICE='$${MAIL_SERVICE}'\" >> env-ghost # \"mail-service\"" - "echo \"export MAIL_SERVICE='$${MAIL_SERVICE}'\" >> env-ghost # \"mail-service\""
- "echo \"export MAIL_USER='$${MAIL_USER}'\" >> env-ghost # \"mail-user\"" - "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 GHOST_MAIL_PASSWORD='$${GHOST_MAIL_PASSWORD}'\" >> env-ghost # \"ghost-mail-password\""
- "echo \"export GHOST_MAIL_SERVICE='$${GHOST_MAIL_SERVICE}'\" >> env-ghost # \"ghost-mail-service\""
- "echo \"export GHOST_MAIL_USER='$${GHOST_MAIL_USER}'\" >> env-ghost # \"ghost-mail-user\""
- "echo \"export GHOST_MYSQL_ROOT_PASSWORD='$${GHOST_MYSQL_ROOT_PASSWORD}'\" >> env-ghost # \"ghost-mysql-root-password\""
- "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
GHOST_MAIL_PASSWORD:
from_secret: ghost-mail-password
GHOST_MAIL_SERVICE:
from_secret: ghost-mail-service
GHOST_MAIL_USER:
from_secret: ghost-mail-user
GHOST_MYSQL_ROOT_PASSWORD:
from_secret: ghost-mysql-root-password
MAIL_SERVICE: MAIL_SERVICE:
from_secret: mail-service from_secret: mail-service
MAIL_USER: MAIL_USER:
@ -141,12 +157,20 @@ steps:
- mail_service - mail_service
- mail_user - mail_user
- commento_origin - commento_origin
- ghost_mail_password
- ghost_mail_service
- ghost_mail_user
- ghost_mysql_root_password
- mysql_root_password - mysql_root_password
script: script:
- export MYSQL_ROOT_PASSWORD=$${MYSQL_ROOT_PASSWORD} - export MYSQL_ROOT_PASSWORD=$${MYSQL_ROOT_PASSWORD}
- export MAIL_SERVICE=$${MAIL_SERVICE} - export MAIL_SERVICE=$${MAIL_SERVICE}
- export MAIL_USER=$${MAIL_USER} - export MAIL_USER=$${MAIL_USER}
- export COMMENTO_ORIGIN=$${COMMENTO_ORIGIN} - export COMMENTO_ORIGIN=$${COMMENTO_ORIGIN}
- export GHOST_MAIL_PASSWORD=$${GHOST_MAIL_PASSWORD}
- export GHOST_MAIL_SERVICE=$${GHOST_MAIL_SERVICE}
- export GHOST_MAIL_USER=$${GHOST_MAIL_USER}
- export GHOST_MYSQL_ROOT_PASSWORD=$${GHOST_MYSQL_ROOT_PASSWORD}
- export DOMAIN=$${DOMAIN} - export DOMAIN=$${DOMAIN}
- export REGISTRY_DOMAIN=$${REGISTRY_DOMAIN} - export REGISTRY_DOMAIN=$${REGISTRY_DOMAIN}
- export REGISTRY_PORT=$${REGISTRY_PORT} - export REGISTRY_PORT=$${REGISTRY_PORT}
@ -159,6 +183,14 @@ steps:
environment: environment:
COMMENTO_ORIGIN: COMMENTO_ORIGIN:
from_secret: commento-origin from_secret: commento-origin
GHOST_MAIL_PASSWORD:
from_secret: ghost-mail-password
GHOST_MAIL_SERVICE:
from_secret: ghost-mail-service
GHOST_MAIL_USER:
from_secret: ghost-mail-user
GHOST_MYSQL_ROOT_PASSWORD:
from_secret: ghost-mysql-root-password
MAIL_SERVICE: MAIL_SERVICE:
from_secret: mail-service from_secret: mail-service
MAIL_USER: MAIL_USER:

View File

@ -2,4 +2,8 @@
'mail-service', 'mail-service',
'mail-user', 'mail-user',
'commento-origin', 'commento-origin',
'ghost-mail-password',
'ghost-mail-service',
'ghost-mail-user',
'ghost-mysql-root-password'
] ]

View File

@ -1,6 +1,6 @@
{ {
"private": true, "private": true,
"dependencies": { "dependencies": {
"@sigyl/jsonnet-drone": "^0.3.1" "@sigyl/jsonnet-drone": "^0.4.0"
} }
} }

View File

@ -1 +1 @@
docker pull ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/ghost docker pull ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/my-ghost

View File

@ -1 +1 @@
docker push ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/ghost docker push ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/my-ghost

View File

@ -1,7 +1,7 @@
n=0 n=0
while : while :
do do
docker login $1 --username client --password $2 \ docker login $1 --username client --password "$2" \
&& break # substitute your command here && break # substitute your command here
n=$((n+1)) n=$((n+1))
if [ $n -ge 10 ]; then if [ $n -ge 10 ]; then

View File

@ -12,10 +12,10 @@
resolved "https://registry.yarnpkg.com/@sigyl/jsonnet-drone-environment/-/jsonnet-drone-environment-0.0.5.tgz#9ea85e08904777bd21a3e4b30b0b91461d0285ff" resolved "https://registry.yarnpkg.com/@sigyl/jsonnet-drone-environment/-/jsonnet-drone-environment-0.0.5.tgz#9ea85e08904777bd21a3e4b30b0b91461d0285ff"
integrity sha512-xVGmdMO1pOyozAWUbJm6mzKBgsLPJ+1hWnGCK3AxPkr7kkDh18hu30+TLzlcQtqq76s5jUfvJUztezsGj/mIcw== integrity sha512-xVGmdMO1pOyozAWUbJm6mzKBgsLPJ+1hWnGCK3AxPkr7kkDh18hu30+TLzlcQtqq76s5jUfvJUztezsGj/mIcw==
"@sigyl/jsonnet-drone@^0.3.1": "@sigyl/jsonnet-drone@^0.4.0":
version "0.3.1" version "0.4.0"
resolved "https://registry.yarnpkg.com/@sigyl/jsonnet-drone/-/jsonnet-drone-0.3.1.tgz#790a83f45556cc613f07fbc98ca760027fa936e7" resolved "https://registry.yarnpkg.com/@sigyl/jsonnet-drone/-/jsonnet-drone-0.4.0.tgz#ebf7bc5e076d7252195fee7be2d1eafd24ee0435"
integrity sha512-FiSyunjR0Udc20I2gA6gkzX3sCB2dPq/ZODrXcm7ROQFKF2Wr4b+xhpovjEdnjKGy8G4d+rRcdN+Jyhp7WQLEg== integrity sha512-96Adxqgo4SIU7skhiD0oPRproK4hy+Gvulym0p0bcSod5bv6b94BcYSfMyJye+sy6oRD0gosJY2uet1rgoB8UA==
dependencies: dependencies:
"@sigyl/jsonnet-compose" "^0.0.2" "@sigyl/jsonnet-compose" "^0.0.2"
"@sigyl/jsonnet-drone-environment" "0.0.5" "@sigyl/jsonnet-drone-environment" "0.0.5"

View File

@ -8,7 +8,7 @@ services:
replicas: 1 replicas: 1
restart_policy: restart_policy:
condition: any condition: any
image: ${LOCAL_DOCKER_REGISTRY}ghost image: ${LOCAL_DOCKER_REGISTRY}my-ghost
volumes: volumes:
- ghost-content-images:/var/lib/ghost/content/images - ghost-content-images:/var/lib/ghost/content/images
- ghost-content-settings:/var/lib/ghost/content/settings - ghost-content-settings:/var/lib/ghost/content/settings