This repository has been archived on 2020-08-11. You can view files and clone it, but cannot push or open issues or pull requests.
stack/docker-compose-home.yml

358 lines
9.5 KiB
YAML
Raw Normal View History

2020-04-02 13:20:50 +00:00
version: "3.7"
services:
letsencrypt-git:
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack == yes]
2020-04-29 08:19:45 +00:00
replicas: 0
2020-04-02 13:20:50 +00:00
restart_policy:
condition: any
2020-04-03 12:50:11 +00:00
image: ${LOCAL_DOCKER_REGISTRY}letsencrypt-git
2020-04-02 13:20:50 +00:00
environment:
- CERTBOT_EMAIL=${CERTBOT_EMAIL}
- SERVER_NAME=${GIT_DOMAIN}
- PROXY_PASS=http://gitea:3000/
2020-04-28 11:06:44 +00:00
- BLOG_PROXY_PASS=http://ghost:2368
- CHAT_PROXY_PASS=http://chat:3000
- REMOTE_PROXY_PASS=http://guacamole:8080/guacamole/
- DRONE_PROXY_PASS=http://drone-server:8080
2020-04-28 23:33:53 +00:00
- REGISTRY_PROXY_PASS=http://registry-1:5000
2020-04-28 11:06:44 +00:00
- LOCATION=/git/
- BLOG_LOCATION=/blog/
- CHAT_LOCATION=/chat/
- REMOTE_LOCATION=/remote/
2020-04-29 13:48:59 +00:00
- DRONE_SERVER_HOST=$DRONE_SERVER_HOST
- TITLE=$TITLE
- DESCRIPTION=$DESCRIPTION
2020-04-29 13:59:27 +00:00
- DRONE_REPO_LINK=$DRONE_REPO_LINK
- DRONE_COMMIT=$DRONE_COMMIT
2020-04-29 13:48:59 +00:00
2020-04-02 13:20:50 +00:00
volumes:
- letsencrypt-git:/etc/letsencrypt
networks:
- appnet
depends_on:
- gitea
2020-04-28 17:39:34 +00:00
ports:
- 80:80
- 443:443
- 5000:5000
- 5001:5001
2020-04-02 13:20:50 +00:00
letsencrypt-drone:
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack == yes]
2020-04-29 08:19:45 +00:00
replicas: 0
2020-04-02 13:20:50 +00:00
restart_policy:
condition: any
2020-04-03 12:50:11 +00:00
image: ${LOCAL_DOCKER_REGISTRY}letsencrypt-drone
2020-04-02 13:20:50 +00:00
environment:
- CERTBOT_EMAIL=${CERTBOT_EMAIL}
- SERVER_NAME=${DRONE_DOMAIN}
- PROXY_PASS=http://drone-server:8080/
volumes:
- letsencrypt-drone:/etc/letsencrypt
networks:
- appnet
depends_on:
- drone-server
gitea:
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack == yes]
replicas: 1
restart_policy:
condition: any
2020-04-30 17:22:48 +00:00
image: ${LOCAL_DOCKER_REGISTRY}gitea
2020-04-02 13:20:50 +00:00
environment:
- USER_UID=1000
- USER_GID=1000
2020-04-28 13:17:31 +00:00
- ROOT_URL=https://${GIT_DOMAIN}/git
2020-04-02 13:20:50 +00:00
- SSH_DOMAIN=${GIT_DOMAIN}
2020-04-30 17:22:48 +00:00
- GITEA_APP_NAME=${GITEA_APP_NAME}
- GIT_DOMAIN=${GIT_DOMAIN}
- GITEA_SERVER_LFS_JWT_SECRET=$GITEA_SERVER_LFS_JWT_SECRET
- GITEA_SECURITY_SECRET_KEY=$GITEA_SECURITY_SECRET_KEY
- GITEA_SECURITY_INTERNAL_TOKEN=$GITEA_SECURITY_INTERNAL_TOKEN
- GITEA_OAUTH2_JWT_SECRET=$GITEA_OAUTH2_JWT_SECRET
- GITEA_MAILER_HOST=$GITEA_MAILER_HOST
- GITEA_MAILER_USER=$GITEA_MAILER_USER
- GITEA_MAILER_FROM=$GITEA_MAILER_FROM
- GITEA_MAILER_PASSWD=$GITEA_MAILER_PASSWD
2020-04-02 13:20:50 +00:00
volumes:
2020-04-28 13:38:14 +00:00
- gitea-app:/data
2020-04-02 13:20:50 +00:00
ports:
- 3000:3000
- 22:22
networks:
- appnet
ngrok:
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack == yes]
2020-04-28 19:51:56 +00:00
replicas: 0
2020-04-02 13:20:50 +00:00
restart_policy:
condition: any
2020-04-03 12:50:11 +00:00
image: ${LOCAL_DOCKER_REGISTRY}ngrok-gitea
2020-04-02 13:20:50 +00:00
ports:
- "4040:4040"
environment:
- GIT_DOMAIN=${GIT_DOMAIN}
- DRONE_DOMAIN=${DRONE_DOMAIN}
- REMOTE_DOMAIN=${REMOTE_DOMAIN}
- BLOG_DOMAIN=${BLOG_DOMAIN}
- CHAT_DOMAIN=${CHAT_DOMAIN}
2020-04-28 16:36:11 +00:00
- NGROK_AUTH_TOKEN=${NGROK_AUTH_TOKEN}
2020-04-02 13:20:50 +00:00
depends_on:
- gitea
networks:
- appnet
drone-server:
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack == yes]
replicas: 1
restart_policy:
condition: any
image: drone/drone:latest
volumes:
- drone:/var/lib/drone
- drone-data:/data
depends_on:
- gitea
environment:
- DRONE_LOGS_DEBUG=true
- DRONE_LOGS_PRETTY=true
2020-04-03 13:54:07 +00:00
- DRONE_GITEA_SERVER=${DRONE_GITEA_SERVER}
2020-04-02 13:20:50 +00:00
- DRONE_GITEA_CLIENT_ID=${DRONE_GITEA_CLIENT_ID}
- DRONE_GITEA_CLIENT_SECRET=${DRONE_GITEA_CLIENT_SECRET}
2020-04-28 19:30:40 +00:00
- DRONE_SERVER_HOST=${DRONE_SERVER_HOST} # tunnel hostname
2020-04-02 13:20:50 +00:00
- DRONE_ADMIN=giles
- DRONE_SERVER_PROTO=https # tunnel adds https on top
- DRONE_SERVER_PORT=:8080
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
- DRONE_USER_CREATE=username:giles,admin:true
- DRONE_AGENTS_ENABLED=true
2020-04-23 18:23:45 +00:00
- DRONE_CONVERT_PLUGIN_ENDPOINT=http://drone-starlark:3000
- DRONE_CONVERT_PLUGIN_SECRET=${DRONE_CONVERT_SECRET}
2020-04-02 13:20:50 +00:00
networks:
- appnet
drone-docker-runner:
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack == yes]
replicas: 1
restart_policy:
condition: any
image: drone/drone-runner-docker:1
depends_on:
- drone-server
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- DRONE_RPC_PROTO=https
2020-04-28 20:01:24 +00:00
- DRONE_RPC_HOST=${DRONE_SERVER_HOST}
2020-04-02 13:20:50 +00:00
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
- DRONE_RUNNER_CAPACITY=8
- DRONE_RUNNER_NAME="docker-runner"
2020-04-23 18:23:45 +00:00
drone-starlark:
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack == yes]
replicas: 1
restart_policy:
condition: any
2020-04-26 11:45:22 +00:00
image: ${LOCAL_DOCKER_REGISTRY}drone-starlark
2020-04-23 18:23:45 +00:00
environment:
- DRONE_DEBUG=true
- DRONE_SECRET=${DRONE_CONVERT_SECRET}
2020-04-24 09:56:09 +00:00
- DRONE_STARLARK_REPO_PATHS=this:/repos
2020-04-29 11:38:54 +00:00
- SIGYL_STACK_NAME=$SIGYL_STACK_NAME
- SIGYL_STACK_ROOT=$SIGYL_STACK_ROOT
2020-04-23 18:23:45 +00:00
networks:
- appnet
2020-04-02 13:20:50 +00:00
registry:
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
- REGISTRY_HTTP_TLS_CERTIFICATE="/run/secrets/registry-cert"
- REGISTRY_HTTP_TLS_KEY="/run/secrets/registry-key"
networks:
- appnet
secrets:
- registry-cert
- registry-key
2020-04-28 22:44:09 +00:00
ports:
- 5003:5000
2020-04-28 23:33:53 +00:00
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
2020-04-02 13:20:50 +00:00
registry-cache:
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack == yes]
replicas: 1
restart_policy:
condition: any
image: registry:2
ports:
2020-04-28 18:20:43 +00:00
- 5002:5001
2020-04-02 13:20:50 +00:00
volumes:
- registry-cache-data:/var/lib/registry
environment:
- REGISTRY_HTTP_ADDR=0.0.0.0:5001
- REGISTRY_HTTP_TLS_CERTIFICATE="/run/secrets/registry-cert"
- REGISTRY_HTTP_TLS_KEY="/run/secrets/registry-key"
- REGISTRY_PROXY_REMOTEURL=http://registry-1.docker.io
networks:
- appnet
secrets:
- registry-cert
- registry-key
2020-04-28 18:47:31 +00:00
2020-04-02 13:20:50 +00:00
ghost:
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack == yes]
replicas: 1
restart_policy:
condition: any
2020-04-29 21:37:23 +00:00
image: ${LOCAL_DOCKER_REGISTRY}ghost
2020-04-02 13:20:50 +00:00
volumes:
- ghost-content:/var/lib/ghost/content
environment:
2020-04-30 00:08:58 +00:00
- GIT_DOMAIN=$GIT_DOMAIN
- GHOST-MAIL-SERVICE=$GHOST-MAIL-SERVICE
- GHOST-MAIL-USER=$GHOST-MAIL-USER
- GHOST-MAIL-PASSWORD=$GHOST-MAIL-PASSWORD
2020-04-02 13:20:50 +00:00
networks:
- appnet
guacamole-postgresql:
deploy:
placement:
2020-04-29 06:29:28 +00:00
constraints: [node.labels.com.sigyl.git-stack-data == yes]
2020-04-02 13:20:50 +00:00
replicas: 1
restart_policy:
condition: any
2020-04-03 12:50:11 +00:00
image: ${LOCAL_DOCKER_REGISTRY}guacamole-postgresql:latest
2020-04-02 13:20:50 +00:00
environment:
2020-04-28 07:34:36 +00:00
POSTGRES_PASSWORD: ${GUACAMOLE_POSTGRES_PASSWORD}
POSTGRES_DB: ${GUACAMOLE_POSTGRES_DB}
2020-04-02 13:20:50 +00:00
volumes:
2020-04-28 13:38:14 +00:00
- guacamole-postgresql-data:/var/lib/postgresql/data
2020-04-02 13:20:50 +00:00
networks:
- appnet
# The backend guacamole server.
guacd:
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack == yes]
replicas: 1
restart_policy:
condition: any
image: guacamole/guacd:latest
networks:
- appnet
guacamole:
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack == yes]
replicas: 1
restart_policy:
condition: any
image: guacamole/guacamole:latest
environment:
- POSTGRES_HOSTNAME=guacamole-postgresql
- POSTGRES_PORT=5432
2020-04-28 07:34:36 +00:00
- POSTGRES_USER=${GUACAMOLE_POSTGRES_USER}
- POSTGRES_PASSWORD=${GUACAMOLE_POSTGRES_PASSWORD}
- POSTGRES_DATABASE=${GUACAMOLE_POSTGRES_DB}
2020-04-02 13:20:50 +00:00
- GUACD_HOSTNAME=guacd
networks:
- appnet
chat:
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack == yes]
2020-04-28 19:51:56 +00:00
replicas: 0 # will scale after mongo initated
2020-04-02 13:20:50 +00:00
restart_policy:
condition: any
2020-04-30 13:26:59 +00:00
image: rocketchat/rocket.chat:3.0.7
2020-04-02 13:20:50 +00:00
networks:
- appnet
environment:
- MONGO_OPLOG_URL=mongodb://chat-mongo:27017/local
2020-04-28 13:42:55 +00:00
- ROOT_URL=https://${GIT_DOMAIN}/chat
2020-04-02 13:20:50 +00:00
- PORT=3000
- MONGO_URL=mongodb://chat-mongo:27017/rocketchat
2020-04-30 12:12:12 +00:00
- ADMIN_USERNAME=${CHAT_ADMIN_NAME}
2020-04-30 11:28:08 +00:00
- ADMIN_PASS=${CHAT_ADMIN_PASSWORD}
- ADMIN_EMAIL=${CHAT_ADMIN_EMAIL}
2020-04-02 13:20:50 +00:00
volumes:
- chat-uploads:/app/uploads
chat-mongo:
deploy:
placement:
2020-04-29 06:29:28 +00:00
constraints: [node.labels.com.sigyl.git-stack-data == yes]
2020-04-02 13:20:50 +00:00
replicas: 1
restart_policy:
condition: any
image: mongo:4.0
networks:
- appnet
environment:
- MONGO_DATA_DIR=/data/db
- MONGO_LOG_DIR=/dev/null
volumes:
- mongo-chat:/data/db
command: mongod --smallfiles --replSet rs0 --oplogSize 128
2020-04-18 08:18:48 +00:00
2020-04-02 13:20:50 +00:00
volumes:
2020-04-28 13:38:14 +00:00
gitea-app:
2020-04-02 13:20:50 +00:00
drone:
drone-data:
registry-data:
registry-cache-data:
2020-04-28 13:38:14 +00:00
guacamole-postgresql-data:
2020-04-02 13:20:50 +00:00
letsencrypt-git:
letsencrypt-drone:
ghost-content:
mongo-chat:
chat-uploads:
networks:
appnet:
driver: overlay
#external: true
secrets:
'registry-cert':
file: .certificates/registry.crt
'registry-key':
file: .certificates/registry.key
2020-04-28 16:36:11 +00:00