.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Giles Bradshaw 2020-04-03 13:50:11 +01:00
parent 34368df723
commit 1887788171
2 changed files with 119 additions and 15 deletions

View File

@ -3,9 +3,6 @@
kind: pipeline kind: pipeline
type: docker type: docker
name: default name: default
when:
branch:
- master
clone: clone:
# skip_verify: true # skip_verify: true
@ -15,7 +12,7 @@ steps:
- name: wait - name: wait
when: when:
branch: branch:
- master - home-deploy
image: docker:dind image: docker:dind
volumes: volumes:
- name: dockersock - name: dockersock
@ -23,10 +20,111 @@ steps:
commands: commands:
- sleep 60 - sleep 60
- name: build-postgres
when:
branch:
- home-deploy
image: docker:dind
volumes:
- name: dockersock
path: /var/run
environment:
LOCAL_DOCKER_REGISTRY:
from_secret: local-docker-registry
commands:
- cd guacamole-postgresql
- docker build . -t $${LOCAL_DOCKER_REGISTRY}guacamole-postgresql
- docker push $${LOCAL_DOCKER_REGISTRY}guacamole-postgresql
- name: build-ngrok
when:
branch:
- home-deploy
image: docker:dind
volumes:
- name: dockersock
path: /var/run
environment:
LOCAL_DOCKER_REGISTRY:
from_secret: local-docker-registry
commands:
- cd ngrok2
- docker build . -t $${LOCAL_DOCKER_REGISTRY}ngrok-gitea
- docker push $${LOCAL_DOCKER_REGISTRY}ngrok-gitea
- name: build-letsencrypt-nginx
when:
branch:
- home-deploy
image: docker:dind
volumes:
- name: dockersock
path: /var/run
environment:
LOCAL_DOCKER_REGISTRY:
from_secret: local-docker-registry
commands:
- cd letsencrypt-nginx
- docker build . -t $${LOCAL_DOCKER_REGISTRY}letsencrypt-nginx
- docker push $${LOCAL_DOCKER_REGISTRY}letsencrypt-nginx
- name: build-letsencrypt-blog
when:
branch:
- home-deploy
image: docker:dind
volumes:
- name: dockersock
path: /var/run
environment:
LOCAL_DOCKER_REGISTRY:
from_secret: local-docker-registry
commands:
- cd letsencrypt-nginx
- sh build.sh blog $${LOCAL_DOCKER_REGISTRY}
- name: build-letsencrypt-drone
when:
branch:
- home-deploy
image: docker:dind
volumes:
- name: dockersock
path: /var/run
environment:
LOCAL_DOCKER_REGISTRY:
from_secret: local-docker-registry
commands:
- cd letsencrypt-nginx
- sh build.sh drone $${LOCAL_DOCKER_REGISTRY}
- name: build-letsencrypt-git
when:
branch:
- home-deploy
image: docker:dind
volumes:
- name: dockersock
path: /var/run
environment:
LOCAL_DOCKER_REGISTRY:
from_secret: local-docker-registry
commands:
- cd letsencrypt-nginx
- sh build.sh git $${LOCAL_DOCKER_REGISTRY}
- name: build-letsencrypt-remote
when:
branch:
- home-deploy
image: docker:dind
volumes:
- name: dockersock
path: /var/run
environment:
LOCAL_DOCKER_REGISTRY:
from_secret: local-docker-registry
commands:
- cd letsencrypt-nginx
- sh build.sh remote $${LOCAL_DOCKER_REGISTRY}
- name: build-letsencrypt-chat - name: build-letsencrypt-chat
when: when:
branch: branch:
- master - home-deploy
image: docker:dind image: docker:dind
volumes: volumes:
- name: dockersock - name: dockersock
@ -40,7 +138,7 @@ steps:
- name: scp files - name: scp files
when: when:
branch: branch:
- master - home-deploy
image: appleboy/drone-scp image: appleboy/drone-scp
settings: settings:
host: host:
@ -58,7 +156,7 @@ steps:
- name: deploy - name: deploy
when: when:
branch: branch:
- master - home-deploy
image: appleboy/drone-ssh image: appleboy/drone-ssh
environment: environment:
DRONE_RPC_SECRET: DRONE_RPC_SECRET:
@ -117,11 +215,17 @@ steps:
- export CHAT_DOMAIN=$CHAT_DOMAIN - export CHAT_DOMAIN=$CHAT_DOMAIN
- export REMOTE_DOMAIN=$REMOTE_DOMAIN - export REMOTE_DOMAIN=$REMOTE_DOMAIN
- export BLOG_DOMAIN=$BLOG_DOMAIN - export BLOG_DOMAIN=$BLOG_DOMAIN
- docker pull $${LOCAL_DOCKER_REGISTRY}letsencrypt-git
- docker pull $${LOCAL_DOCKER_REGISTRY}letsencrypt-chat
- docker pull $${LOCAL_DOCKER_REGISTRY}letsencrypt-remote
- docker pull $${LOCAL_DOCKER_REGISTRY}letsencrypt-blog
- docker pull $${LOCAL_DOCKER_REGISTRY}letsencrypt-drone
- docker network prune -f - docker network prune -f
- cd /home/$SSH_USER/gitea-drone-stack - cd /home/$SSH_USER/gitea-drone-stack
- docker stack rm gitea - docker stack rm gitea
- sleep 60 - sleep 60
- docker stack deploy -c docker-compose.yml gitea - docker stack deploy -c docker-compose-home.yml gitea
#- sleep 300 #- sleep 300
services: services:

View File

@ -7,7 +7,7 @@ services:
replicas: 1 replicas: 1
restart_policy: restart_policy:
condition: any condition: any
image: ${LOCAL_DOCKER_REGISTRY}/letsencrypt-chat image: ${LOCAL_DOCKER_REGISTRY}letsencrypt-chat
environment: environment:
- SERVER_NAME=${CHAT_DOMAIN} - SERVER_NAME=${CHAT_DOMAIN}
- CERTBOT_EMAIL=${CERTBOT_EMAIL} - CERTBOT_EMAIL=${CERTBOT_EMAIL}
@ -23,7 +23,7 @@ services:
replicas: 1 replicas: 1
restart_policy: restart_policy:
condition: any condition: any
image: ${LOCAL_DOCKER_REGISTRY}/letsencrypt-remote image: ${LOCAL_DOCKER_REGISTRY}letsencrypt-remote
environment: environment:
- SERVER_NAME=${REMOTE_DOMAIN} - SERVER_NAME=${REMOTE_DOMAIN}
- CERTBOT_EMAIL=${CERTBOT_EMAIL} - CERTBOT_EMAIL=${CERTBOT_EMAIL}
@ -41,7 +41,7 @@ services:
replicas: 1 replicas: 1
restart_policy: restart_policy:
condition: any condition: any
image: ${LOCAL_DOCKER_REGISTRY}/letsencrypt-git image: ${LOCAL_DOCKER_REGISTRY}letsencrypt-git
environment: environment:
- CERTBOT_EMAIL=${CERTBOT_EMAIL} - CERTBOT_EMAIL=${CERTBOT_EMAIL}
- SERVER_NAME=${GIT_DOMAIN} - SERVER_NAME=${GIT_DOMAIN}
@ -59,7 +59,7 @@ services:
replicas: 1 replicas: 1
restart_policy: restart_policy:
condition: any condition: any
image: ${LOCAL_DOCKER_REGISTRY}/letsencrypt-drone image: ${LOCAL_DOCKER_REGISTRY}letsencrypt-drone
environment: environment:
- CERTBOT_EMAIL=${CERTBOT_EMAIL} - CERTBOT_EMAIL=${CERTBOT_EMAIL}
- SERVER_NAME=${DRONE_DOMAIN} - SERVER_NAME=${DRONE_DOMAIN}
@ -97,7 +97,7 @@ services:
replicas: 1 replicas: 1
restart_policy: restart_policy:
condition: any condition: any
image: ${LOCAL_DOCKER_REGISTRY}/ngrok-gitea image: ${LOCAL_DOCKER_REGISTRY}ngrok-gitea
ports: ports:
- "4040:4040" - "4040:4040"
volumes: volumes:
@ -216,7 +216,7 @@ services:
replicas: 1 replicas: 1
restart_policy: restart_policy:
condition: any condition: any
image: ${LOCAL_DOCKER_REGISTRY}/letsencrypt-blog image: ${LOCAL_DOCKER_REGISTRY}letsencrypt-blog
environment: environment:
- CERTBOT_EMAIL=${CERTBOT_EMAIL} - CERTBOT_EMAIL=${CERTBOT_EMAIL}
- SERVER_NAME=${BLOG_DOMAIN} - SERVER_NAME=${BLOG_DOMAIN}
@ -251,7 +251,7 @@ services:
replicas: 1 replicas: 1
restart_policy: restart_policy:
condition: any condition: any
image: ${LOCAL_DOCKER_REGISTRY}/guacamole-postgresql:latest image: ${LOCAL_DOCKER_REGISTRY}guacamole-postgresql:latest
environment: environment:
POSTGRES_PASSWORD: guacroot POSTGRES_PASSWORD: guacroot
POSTGRES_DB: guacamole_db POSTGRES_DB: guacamole_db