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}/
|
export LOCAL_DOCKER_REGISTRY=${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/
|
||||||
docker stack rm drone \
|
docker stack rm drone \
|
||||||
&& echo 'sleeping...zzz' \
|
&& echo 'sleeping...zzz' \
|
||||||
&& sleep 60 \
|
&& sleep 30 \
|
||||||
&& docker stack deploy -c docker-compose.yml drone --with-registry-auth
|
&& 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
|
# drone
|
||||||
|
|
||||||
## secrets
|
## secrets
|
||||||
* drone-convert-secret
|
|
||||||
* drone-gitea-client-id
|
* drone-gitea-client-id
|
||||||
* drone-gitea-client-secret
|
* drone-gitea-client-secret
|
||||||
* drone-gitea-server
|
* drone-gitea-server
|
||||||
|
@ -8,5 +9,6 @@
|
||||||
* drone-server-host
|
* drone-server-host
|
||||||
* local-docker-registry
|
* local-docker-registry
|
||||||
* registry-password
|
* registry-password
|
||||||
|
* local-ip
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,11 +4,11 @@ services:
|
||||||
# drone server application
|
# drone server application
|
||||||
deploy:
|
deploy:
|
||||||
placement:
|
placement:
|
||||||
constraints: [node.labels.com.sigyl.git-stack == yes]
|
constraints: [node.labels.com.sigyl.drone == yes]
|
||||||
replicas: 1
|
replicas: 1
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: any
|
condition: any
|
||||||
image: ${LOCAL_DOCKER_REGISTRY}drone/drone:2.4.0
|
image: ${LOCAL_DOCKER_REGISTRY}drone
|
||||||
volumes:
|
volumes:
|
||||||
- drone-5:/var/lib/drone
|
- drone-5:/var/lib/drone
|
||||||
- drone-data-5:/data
|
- drone-data-5:/data
|
||||||
|
@ -26,18 +26,20 @@ services:
|
||||||
- DRONE_USER_CREATE=username:giles,admin:true
|
- DRONE_USER_CREATE=username:giles,admin:true
|
||||||
- DRONE_AGENTS_ENABLED=true
|
- DRONE_AGENTS_ENABLED=true
|
||||||
- DRONE_JSONNET_ENABLED=true
|
- DRONE_JSONNET_ENABLED=true
|
||||||
|
ports:
|
||||||
|
- 81:8080
|
||||||
networks:
|
networks:
|
||||||
- appnet
|
- appnet
|
||||||
- externalnet
|
- externalnet
|
||||||
drone-docker-runner:
|
drone-runner:
|
||||||
# drone runner performs builds
|
# drone runner performs builds
|
||||||
deploy:
|
deploy:
|
||||||
placement:
|
placement:
|
||||||
constraints: [node.labels.com.sigyl.git-stack == yes]
|
constraints: [node.labels.com.sigyl.drone-runner == yes]
|
||||||
replicas: 1
|
replicas: 1
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: any
|
condition: any
|
||||||
image: ${LOCAL_DOCKER_REGISTRY}drone/drone-runner-docker:1.6.3
|
image: ${LOCAL_DOCKER_REGISTRY}drone-runner
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
environment:
|
environment:
|
||||||
|
@ -46,7 +48,7 @@ services:
|
||||||
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
|
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
|
||||||
- DRONE_RUNNER_CAPACITY=8
|
- DRONE_RUNNER_CAPACITY=8
|
||||||
- DRONE_RUNNER_NAME="docker-runner"
|
- 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:
|
networks:
|
||||||
- appnet
|
- appnet
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -56,7 +58,9 @@ volumes:
|
||||||
networks:
|
networks:
|
||||||
appnet:
|
appnet:
|
||||||
driver: overlay
|
driver: overlay
|
||||||
|
attachable: true
|
||||||
#external: true
|
#external: true
|
||||||
externalnet:
|
externalnet:
|
||||||
driver: overlay
|
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