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-do.yml

177 lines
4.6 KiB
YAML
Raw Normal View History

2020-04-02 13:20:50 +00:00
version: "3.7"
services:
2020-04-03 08:17:34 +00:00
letsencrypt-do:
2020-04-02 13:20:50 +00:00
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack == yes]
replicas: 1
restart_policy:
condition: any
2020-04-03 10:55:28 +00:00
image: ${LOCAL_DOCKER_REGISTRY}letsencrypt-do2
2020-04-02 13:20:50 +00:00
environment:
- CERTBOT_EMAIL=${CERTBOT_EMAIL}
- SERVER_NAME=${GIT_DOMAIN}
- PROXY_PASS=http://gitea:3000/
- BLOG_PROXY_PASS=http://ghost:2368
- CHAT_PROXY_PASS=http://chat:3000
2020-04-02 15:38:35 +00:00
- DRONE_PROXY_PASS=http://drone-server:8080
- REGISTRY_PROXY_PASS=http://registry:5000
2020-04-02 13:20:50 +00:00
- LOCATION=/git/
- BLOG_LOCATION=/blog/
- CHAT_LOCATION=/chat/
volumes:
- letsencrypt-git:/etc/letsencrypt
networks:
- appnet
ports:
- 80:80
- 443:443
- 5000:5000
2020-04-02 15:38:35 +00:00
- 5001:5001
2020-04-02 13:20:50 +00:00
gitea:
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack == yes]
replicas: 1
restart_policy:
condition: any
image: gitea/gitea:latest
environment:
- USER_UID=1000
- USER_GID=1000
- ROOT_URL=https://${GIT_DOMAIN}/git
- SSH_DOMAIN=${GIT_DOMAIN}
volumes:
- gitea-app:/data
ports:
- 3000
- 22:22
networks:
- appnet
ghost:
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack == yes]
replicas: 1
restart_policy:
condition: any
image: ghost
volumes:
- ghost-content:/var/lib/ghost/content
- ./ghost/config.production.json:/var/lib/ghost/config.production.json
environment:
- url=https://${GIT_DOMAIN}/blog
networks:
- appnet
chat:
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack-chat == yes]
replicas: 0 # will scale after mongo initated
restart_policy:
condition: any
image: rocketchat/rocket.chat:latest
networks:
- appnet
environment:
- MONGO_OPLOG_URL=mongodb://chat-mongo:27017/local
- ROOT_URL=https://${GIT_DOMAIN}/chat/
- ROOT_URL_PATH_PREFIX=chat
- PORT=3000
- MONGO_URL=mongodb://chat-mongo:27017/rocketchat
volumes:
- chat-uploads:/app/uploads
chat-mongo:
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack-chat == yes]
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
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
- DRONE_GITEA_SERVER=https://${GIT_DOMAIN}/git
- DRONE_GITEA_CLIENT_ID=${DRONE_GITEA_CLIENT_ID}
- DRONE_GITEA_CLIENT_SECRET=${DRONE_GITEA_CLIENT_SECRET}
- DRONE_SERVER_HOST=${GIT_DOMAIN}:5000 # tunnel hostname
- 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
#- DRONE_ENV_PLUGIN_ENDPOINT=http://git.local-domain:8888
#- DRONE_ENV_PLUGIN_TOKEN=anything
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-02 15:45:59 +00:00
- DRONE_RPC_HOST=${GIT_DOMAIN}:5000
2020-04-02 13:20:50 +00:00
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
- DRONE_RUNNER_CAPACITY=8
- DRONE_RUNNER_NAME="docker-runner"
#- DRONE_ENV_PLUGIN_ENDPOINT=http://git.local-domain:8888
#- DRONE_ENV_PLUGIN_TOKEN=anything
2020-04-02 15:38:35 +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
networks:
- appnet
2020-04-02 13:20:50 +00:00
volumes:
gitea-db:
gitea-app:
letsencrypt-git:
ghost-content:
mongo-chat:
chat-uploads:
drone:
drone-data:
2020-04-02 15:38:35 +00:00
registry-data:
2020-04-02 13:20:50 +00:00
networks:
appnet:
driver: overlay