Compare commits
No commits in common. "do" and "master" have entirely different histories.
|
@ -10,9 +10,9 @@ def main(ctx):
|
|||
stackRoot,
|
||||
stackName,
|
||||
[
|
||||
"docker service scale proxy_ngrok=1".format(name=stackName),
|
||||
"docker service scale {name}_ngrok=1".format(name=stackName),
|
||||
"docker service scale {name}_chat=1".format(name=stackName),
|
||||
"docker service scale proxy_letsencrypt-drone=1".format(name=stackName),
|
||||
"docker service scale {name}_letsencrypt-drone=1".format(name=stackName),
|
||||
]
|
||||
)
|
||||
|
|
@ -1,115 +0,0 @@
|
|||
version: "3.7"
|
||||
services:
|
||||
letsencrypt-git:
|
||||
# nginx reverse proxy for all apps (except drone in a subdomain)
|
||||
# automatically obtains and refreshes ssl certificates with letsencrypt
|
||||
deploy:
|
||||
placement:
|
||||
constraints: [node.labels.com.sigyl.git-stack == yes]
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: any
|
||||
image: ${LOCAL_DOCKER_REGISTRY}letsencrypt-git
|
||||
environment:
|
||||
- CERTBOT_EMAIL=${CERTBOT_EMAIL}
|
||||
- SERVER_NAME=${GIT_DOMAIN}
|
||||
- GIT_PROXY_PASS=http://${SIGYL_STACK_NAME}_gitea:3000/
|
||||
- BLOG_PROXY_PASS=http://${SIGYL_STACK_NAME}_ghost:2368/
|
||||
- CHAT_PROXY_PASS=http://${SIGYL_STACK_NAME}_chat:3000/
|
||||
- COMMENTO_PROXY_PASS=http://${SIGYL_STACK_NAME}_commento:8080/
|
||||
- REMOTE_PROXY_PASS=http://${SIGYL_STACK_NAME}_guacamole:8080/guacamole/
|
||||
- DRONE_PROXY_PASS=http://${SIGYL_STACK_NAME}_drone-server:8080/
|
||||
- REGISTRY_PROXY_PASS=http://registry-1:5000
|
||||
- PORTAINER_PROXY_PASS=http://${SIGYL_STACK_NAME}_portainer:9000/
|
||||
- PORTAINER_LOCATION=/portainer/
|
||||
- MATOMO_PROXY_PASS=http://${SIGYL_STACK_NAME}_matomo-web/
|
||||
- MATOMO_LOCATION=/analytics/
|
||||
- NAGIOS_PROXY_PASS=http://${SIGYL_STACK_NAME}_nagios/
|
||||
- NAGIOS_LOCATION=/nagios/
|
||||
- ZABBIX_PROXY_PASS=http://${SIGYL_STACK_NAME}_zabbix-web:8080/
|
||||
- ZABBIX_LOCATION=/zabbix/
|
||||
- GIT_LOCATION=/git/
|
||||
- BLOG_LOCATION=/
|
||||
- CHAT_LOCATION=/chat/
|
||||
- COMMENTO_LOCATION=/comment/
|
||||
- REMOTE_LOCATION=/remote/
|
||||
- TITLE=$TITLE
|
||||
- DESCRIPTION=$DESCRIPTION
|
||||
- DRONE_REPO_LINK=$DRONE_REPO_LINK
|
||||
- DRONE_COMMIT=$DRONE_COMMIT
|
||||
volumes:
|
||||
- letsencrypt-git:/etc/letsencrypt
|
||||
networks:
|
||||
- externalnet
|
||||
- appnet
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
- 5000:5000
|
||||
- 5001:5001
|
||||
- 5005:5005
|
||||
letsencrypt-drone:
|
||||
# reverse proxy for drone in a subdomain
|
||||
deploy:
|
||||
placement:
|
||||
constraints: [node.labels.com.sigyl.git-stack-data == yes]
|
||||
replicas: 0
|
||||
restart_policy:
|
||||
condition: any
|
||||
image: ${LOCAL_DOCKER_REGISTRY}letsencrypt-drone
|
||||
environment:
|
||||
- CERTBOT_EMAIL=${CERTBOT_EMAIL}
|
||||
- SERVER_NAME=${DRONE_DOMAIN}
|
||||
- PROXY_PASS=http://${SIGYL_STACK_NAME}_drone-server:8080/
|
||||
volumes:
|
||||
- letsencrypt-drone:/etc/letsencrypt
|
||||
networks:
|
||||
- appnet
|
||||
- externalnet
|
||||
ngrok:
|
||||
# ngrok tunnel client
|
||||
deploy:
|
||||
placement:
|
||||
constraints: [node.labels.com.sigyl.git-stack == yes]
|
||||
replicas: 0
|
||||
restart_policy:
|
||||
condition: any
|
||||
image: ${LOCAL_DOCKER_REGISTRY}ngrok-gitea
|
||||
ports:
|
||||
- "4040:4040"
|
||||
environment:
|
||||
- GIT_DOMAIN=${GIT_DOMAIN}
|
||||
- DRONE_DOMAIN=${DRONE_DOMAIN}
|
||||
- REMOTE_DOMAIN=${REMOTE_DOMAIN}
|
||||
- BLOG_DOMAIN=${BLOG_DOMAIN}
|
||||
- CHAT_DOMAIN=${CHAT_DOMAIN}
|
||||
- NGROK_AUTH_TOKEN=${NGROK_AUTH_TOKEN}
|
||||
networks:
|
||||
- appnet
|
||||
registry-1:
|
||||
deploy:
|
||||
placement:
|
||||
constraints: [node.labels.com.sigyl.git-stack == yes]
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: any
|
||||
image: registry:2
|
||||
volumes:
|
||||
- registry-data:/var/lib/registry
|
||||
environment:
|
||||
- REGISTRY_HTTP_ADDR=0.0.0.0:5000
|
||||
networks:
|
||||
- appnet
|
||||
- externalnet
|
||||
volumes:
|
||||
letsencrypt-git:
|
||||
letsencrypt-drone:
|
||||
registry-data:
|
||||
|
||||
networks:
|
||||
appnet:
|
||||
driver: overlay
|
||||
#external: true
|
||||
externalnet:
|
||||
driver: overlay
|
||||
external: true
|
|
@ -1,6 +1,73 @@
|
|||
version: "3.7"
|
||||
services:
|
||||
letsencrypt-git:
|
||||
# nginx reverse proxy for all apps (except drone in a subdomain)
|
||||
# automatically obtains and refreshes ssl certificates with letsencrypt
|
||||
deploy:
|
||||
placement:
|
||||
constraints: [node.labels.com.sigyl.git-stack == yes]
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: any
|
||||
image: ${LOCAL_DOCKER_REGISTRY}letsencrypt-git
|
||||
environment:
|
||||
- CERTBOT_EMAIL=${CERTBOT_EMAIL}
|
||||
- SERVER_NAME=${GIT_DOMAIN}
|
||||
- GIT_PROXY_PASS=http://gitea:3000/
|
||||
- BLOG_PROXY_PASS=http://ghost:2368/
|
||||
- CHAT_PROXY_PASS=http://chat:3000/
|
||||
- COMMENTO_PROXY_PASS=http://commento:8080/
|
||||
- REMOTE_PROXY_PASS=http://guacamole:8080/guacamole/
|
||||
- DRONE_PROXY_PASS=http://drone-server:8080/
|
||||
- REGISTRY_PROXY_PASS=http://registry-1:5000
|
||||
- PORTAINER_PROXY_PASS=http://portainer:9000/
|
||||
- PORTAINER_LOCATION=/portainer/
|
||||
- MATOMO_PROXY_PASS=http://matomo-web/
|
||||
- MATOMO_LOCATION=/analytics/
|
||||
- NAGIOS_PROXY_PASS=http://nagios/
|
||||
- NAGIOS_LOCATION=/nagios/
|
||||
- ZABBIX_PROXY_PASS=http://zabbix-web:8080/
|
||||
- ZABBIX_LOCATION=/zabbix/
|
||||
- GIT_LOCATION=/git/
|
||||
- BLOG_LOCATION=/
|
||||
- CHAT_LOCATION=/chat/
|
||||
- COMMENTO_LOCATION=/comment/
|
||||
- REMOTE_LOCATION=/remote/
|
||||
- DRONE_SERVER_HOST=$DRONE_SERVER_HOST
|
||||
- TITLE=$TITLE
|
||||
- DESCRIPTION=$DESCRIPTION
|
||||
- DRONE_REPO_LINK=$DRONE_REPO_LINK
|
||||
- DRONE_COMMIT=$DRONE_COMMIT
|
||||
|
||||
volumes:
|
||||
- letsencrypt-git:/etc/letsencrypt
|
||||
networks:
|
||||
- appnet
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
- 5000:5000
|
||||
- 5001:5001
|
||||
- 5005:5005
|
||||
letsencrypt-drone:
|
||||
# reverse proxy for drone in a subdomain
|
||||
deploy:
|
||||
placement:
|
||||
constraints: [node.labels.com.sigyl.git-stack-data == yes]
|
||||
replicas: 0
|
||||
restart_policy:
|
||||
condition: any
|
||||
image: ${LOCAL_DOCKER_REGISTRY}letsencrypt-drone
|
||||
environment:
|
||||
- CERTBOT_EMAIL=${CERTBOT_EMAIL}
|
||||
- SERVER_NAME=${DRONE_DOMAIN}
|
||||
- PROXY_PASS=http://drone-server:8080/
|
||||
volumes:
|
||||
- letsencrypt-drone:/etc/letsencrypt
|
||||
networks:
|
||||
- appnet
|
||||
gitea:
|
||||
# gitea application
|
||||
deploy:
|
||||
placement:
|
||||
constraints: [node.labels.com.sigyl.git-stack == yes]
|
||||
|
@ -31,7 +98,26 @@ services:
|
|||
- 22:22
|
||||
networks:
|
||||
- appnet
|
||||
- externalnet
|
||||
ngrok:
|
||||
# ngrok tunnel client
|
||||
deploy:
|
||||
placement:
|
||||
constraints: [node.labels.com.sigyl.git-stack == yes]
|
||||
replicas: 0
|
||||
restart_policy:
|
||||
condition: any
|
||||
image: ${LOCAL_DOCKER_REGISTRY}ngrok-gitea
|
||||
ports:
|
||||
- "4040:4040"
|
||||
environment:
|
||||
- GIT_DOMAIN=${GIT_DOMAIN}
|
||||
- DRONE_DOMAIN=${DRONE_DOMAIN}
|
||||
- REMOTE_DOMAIN=${REMOTE_DOMAIN}
|
||||
- BLOG_DOMAIN=${BLOG_DOMAIN}
|
||||
- CHAT_DOMAIN=${CHAT_DOMAIN}
|
||||
- NGROK_AUTH_TOKEN=${NGROK_AUTH_TOKEN}
|
||||
networks:
|
||||
- appnet
|
||||
drone-server:
|
||||
# drone server application
|
||||
deploy:
|
||||
|
@ -61,7 +147,6 @@ services:
|
|||
- DRONE_CONVERT_PLUGIN_SECRET=${DRONE_CONVERT_SECRET}
|
||||
networks:
|
||||
- appnet
|
||||
- externalnet
|
||||
drone-docker-runner:
|
||||
# drone runner performs builds
|
||||
deploy:
|
||||
|
@ -74,13 +159,11 @@ services:
|
|||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
- DRONE_RPC_PROTO=http
|
||||
- DRONE_RPC_HOST=drone-server:8080
|
||||
- DRONE_RPC_PROTO=https
|
||||
- DRONE_RPC_HOST=${DRONE_SERVER_HOST}
|
||||
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
|
||||
- DRONE_RUNNER_CAPACITY=8
|
||||
- DRONE_RUNNER_NAME="docker-runner"
|
||||
networks:
|
||||
- appnet
|
||||
drone-starlark:
|
||||
# drone starlark server converts starlark to yaml
|
||||
deploy:
|
||||
|
@ -120,6 +203,21 @@ services:
|
|||
- registry-key
|
||||
ports:
|
||||
- 5003:5000
|
||||
registry-1:
|
||||
# internal registry #1 (why?)
|
||||
deploy:
|
||||
placement:
|
||||
constraints: [node.labels.com.sigyl.git-stack == yes]
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: any
|
||||
image: registry:2
|
||||
volumes:
|
||||
- registry-data:/var/lib/registry
|
||||
environment:
|
||||
- REGISTRY_HTTP_ADDR=0.0.0.0:5000
|
||||
networks:
|
||||
- appnet
|
||||
registry-cache:
|
||||
# registry cache (used?)
|
||||
deploy:
|
||||
|
@ -170,10 +268,8 @@ services:
|
|||
- database__connection__user=root
|
||||
- database__connection__password=$GHOST_MYSQL_ROOT_PASSWORD
|
||||
- database__connection__database=ghost
|
||||
- database__pool__min=0 # https://github.com/knex/knex/issues/975
|
||||
networks:
|
||||
- appnet
|
||||
- externalnet
|
||||
ghost-mysql:
|
||||
image: mysql:5.7
|
||||
deploy:
|
||||
|
@ -212,7 +308,6 @@ services:
|
|||
COMMENTO_POSTGRES: postgres://${COMMENTO_POSTGRES_USER}:${COMMENTO_POSTGRES_PASSWORD}@commento-postgres:5432/${COMMENTO_POSTGRES_DB}?sslmode=disable
|
||||
networks:
|
||||
- appnet
|
||||
- externalnet
|
||||
commento-postgres:
|
||||
deploy:
|
||||
placement:
|
||||
|
@ -261,7 +356,6 @@ services:
|
|||
- ./nagios/contacts/contacts.cfg:/opt/nagios/etc/objects/contacts.cfg
|
||||
networks:
|
||||
- appnet
|
||||
- externalnet
|
||||
matomo:
|
||||
image: matomo:fpm-alpine
|
||||
deploy:
|
||||
|
@ -300,7 +394,6 @@ services:
|
|||
- ./matomo/matomo.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
networks:
|
||||
- appnet
|
||||
- externalnet
|
||||
matomo-mariadb:
|
||||
deploy:
|
||||
placement:
|
||||
|
@ -366,7 +459,6 @@ services:
|
|||
image: zabbix/zabbix-web-nginx-mysql
|
||||
networks:
|
||||
- appnet
|
||||
- externalnet
|
||||
environment:
|
||||
DB_SERVER_HOST: zabbix-mariadb
|
||||
MYSQL_USER: zabbix
|
||||
|
@ -402,7 +494,6 @@ services:
|
|||
- GUACD_HOSTNAME=guacd
|
||||
networks:
|
||||
- appnet
|
||||
- externalnet
|
||||
chat:
|
||||
deploy:
|
||||
placement:
|
||||
|
@ -413,7 +504,6 @@ services:
|
|||
image: rocketchat/rocket.chat:3.0.7
|
||||
networks:
|
||||
- appnet
|
||||
- externalnet
|
||||
environment:
|
||||
- MONGO_OPLOG_URL=mongodb://chat-mongo:27017/local
|
||||
- ROOT_URL=https://${GIT_DOMAIN}/chat
|
||||
|
@ -456,7 +546,6 @@ services:
|
|||
networks:
|
||||
#- proxy
|
||||
- appnet
|
||||
- externalnet
|
||||
portainer-agent:
|
||||
image: portainer/agent:1.5.1
|
||||
environment:
|
||||
|
@ -482,6 +571,8 @@ volumes:
|
|||
registry-cache-data:
|
||||
guacamole-postgresql-data:
|
||||
commento-postgresql-data:
|
||||
letsencrypt-git:
|
||||
letsencrypt-drone:
|
||||
ghost-content:
|
||||
ghost-data:
|
||||
ghost-content-adapters:
|
||||
|
@ -500,11 +591,9 @@ networks:
|
|||
appnet:
|
||||
driver: overlay
|
||||
#external: true
|
||||
externalnet:
|
||||
driver: overlay
|
||||
external: true
|
||||
secrets:
|
||||
'registry-cert':
|
||||
file: .certificates/registry.crt
|
||||
'registry-key':
|
||||
file: .certificates/registry.key
|
||||
|
|
@ -30,9 +30,6 @@ def deploy(
|
|||
"export DRONE_COMMIT={commit}".format(commit=ctx.build.commit),
|
||||
"docker network prune -f",
|
||||
"cd {folder}".format(folder=folder),
|
||||
"docker stack rm proxy",
|
||||
"sleep 30",
|
||||
"docker stack deploy -c docker-compose-proxy.yml proxy",
|
||||
"docker stack rm {name}".format(name = name),
|
||||
"sleep 30",
|
||||
"docker stack deploy -c {filename} {name}".format(name= name, filename = filename),
|
||||
|
|
Reference in New Issue