Compare commits
1 Commits
master
...
deploy-at-
Author | SHA1 | Date |
---|---|---|
giles | 63e304cc70 |
|
@ -1 +1,6 @@
|
|||
echo 'nothing to build'
|
||||
docker build drone -t ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/drone \
|
||||
--build-arg REGISTRY= \
|
||||
&& docker build drone-runner -t ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/drone-runner \
|
||||
--build-arg REGISTRY= \
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
export LOCAL_DOCKER_REGISTRY=${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/
|
||||
docker stack rm drone \
|
||||
&& echo 'sleeping...zzz' \
|
||||
&& sleep 60 \
|
||||
&& sleep 30 \
|
||||
&& docker stack deploy -c docker-compose.yml drone --with-registry-auth
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,7 @@
|
|||
# drone
|
||||
|
||||
## secrets
|
||||
* drone-convert-secret
|
||||
|
||||
* drone-gitea-client-id
|
||||
* drone-gitea-client-secret
|
||||
* drone-gitea-server
|
||||
|
@ -8,5 +9,6 @@
|
|||
* drone-server-host
|
||||
* local-docker-registry
|
||||
* registry-password
|
||||
* local-ip
|
||||
|
||||
|
||||
|
|
|
@ -4,11 +4,11 @@ services:
|
|||
# drone server application
|
||||
deploy:
|
||||
placement:
|
||||
constraints: [node.labels.com.sigyl.git-stack == yes]
|
||||
constraints: [node.labels.com.sigyl.drone == yes]
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: any
|
||||
image: ${LOCAL_DOCKER_REGISTRY}drone/drone:2.4.0
|
||||
image: ${LOCAL_DOCKER_REGISTRY}drone
|
||||
volumes:
|
||||
- drone-5:/var/lib/drone
|
||||
- drone-data-5:/data
|
||||
|
@ -26,18 +26,20 @@ services:
|
|||
- DRONE_USER_CREATE=username:giles,admin:true
|
||||
- DRONE_AGENTS_ENABLED=true
|
||||
- DRONE_JSONNET_ENABLED=true
|
||||
ports:
|
||||
- 81:8080
|
||||
networks:
|
||||
- appnet
|
||||
- externalnet
|
||||
drone-docker-runner:
|
||||
drone-runner:
|
||||
# drone runner performs builds
|
||||
deploy:
|
||||
placement:
|
||||
constraints: [node.labels.com.sigyl.git-stack == yes]
|
||||
constraints: [node.labels.com.sigyl.drone-runner == yes]
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: any
|
||||
image: ${LOCAL_DOCKER_REGISTRY}drone/drone-runner-docker:1.6.3
|
||||
image: ${LOCAL_DOCKER_REGISTRY}drone-runner
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
|
@ -46,7 +48,7 @@ services:
|
|||
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
|
||||
- DRONE_RUNNER_CAPACITY=8
|
||||
- DRONE_RUNNER_NAME="docker-runner"
|
||||
- DRONE_RUNNER_ENVIRON=SCHEME:$SCHEME,DOMAIN:$DOMAIN,REGISTRY_DOMAIN:$REGISTRY_DOMAIN,REGISTRY_PORT:$REGISTRY_PORT,REGISTRY_PASSWORD:$REGISTRY_PASSWORD,SSH_HOST:$SSH_HOST,SSH_PORT:$SSH_PORT,SSH_USERNAME:$SSH_USERNAME,SSH_KEY:$SSH_KEY
|
||||
- DRONE_RUNNER_ENVIRON=SCHEME:$SCHEME,DOMAIN:$DOMAIN,REGISTRY_DOMAIN:$REGISTRY_DOMAIN,REGISTRY_PORT:$REGISTRY_PORT,REGISTRY_PASSWORD:$REGISTRY_PASSWORD,SSH_HOST:$SSH_HOST,SSH_PORT:$SSH_PORT,SSH_USERNAME:$SSH_USERNAME,SSH_KEY:$SSH_KEY,SSH_PASSWORD:$SSH_PASSWORD
|
||||
networks:
|
||||
- appnet
|
||||
volumes:
|
||||
|
@ -56,7 +58,9 @@ volumes:
|
|||
networks:
|
||||
appnet:
|
||||
driver: overlay
|
||||
attachable: true
|
||||
#external: true
|
||||
externalnet:
|
||||
driver: overlay
|
||||
external: true
|
||||
external: true
|
||||
name: externalnet
|
|
@ -0,0 +1,17 @@
|
|||
FROM ${REGISTRY}drone/drone-runner-docker:1.6.3
|
||||
# USER root
|
||||
|
||||
#RUN apk update
|
||||
#RUN apk add gettext
|
||||
|
||||
#COPY hosts.template /etc/hosts.template
|
||||
#COPY run.sh /
|
||||
#ENTRYPOINT sh /run.sh
|
||||
#CMD ["sh", "/run.sh"]
|
||||
|
||||
|
||||
#COPY config.production.json.template /var/lib/ghost/
|
||||
#COPY --from=git /themes/ /var/lib/ghost/content/themes/
|
||||
#COPY post.hbs /hbs/
|
||||
#COPY run.sh /
|
||||
#CMD ["sh", "/run.sh"]
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
${GIT_IP} ${GIT_DOMAIN}
|
|
@ -0,0 +1,2 @@
|
|||
envsubst < /etc/hosts.template >> /etc/hosts
|
||||
/bin/drone-runner-docker
|
|
@ -0,0 +1,17 @@
|
|||
FROM ${REGISTRY}drone/drone:2.12.0
|
||||
# USER root
|
||||
|
||||
#RUN apk update
|
||||
#RUN apk add gettext
|
||||
|
||||
#COPY hosts.template /etc/hosts.template
|
||||
#COPY run.sh /
|
||||
#ENTRYPOINT sh /run.sh
|
||||
#CMD ["sh", "/run.sh"]
|
||||
|
||||
|
||||
#COPY config.production.json.template /var/lib/ghost/
|
||||
#COPY --from=git /themes/ /var/lib/ghost/content/themes/
|
||||
#COPY post.hbs /hbs/
|
||||
#COPY run.sh /
|
||||
#CMD ["sh", "/run.sh"]
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
${GIT_IP} ${GIT_DOMAIN}
|
|
@ -0,0 +1,2 @@
|
|||
envsubst < /etc/hosts.template >> /etc/hosts
|
||||
drone-server
|
Loading…
Reference in New Issue