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

511 lines
14 KiB
YAML
Raw Normal View History

2020-04-02 13:20:50 +00:00
version: "3.7"
services:
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
2020-05-08 08:17:57 +00:00
- externalnet
2020-04-02 13:20:50 +00:00
drone-server:
2020-04-30 11:52:56 +00:00
# drone server application
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-30 23:38:50 +00:00
image: drone/drone:1.7.0
2020-04-02 13:20:50 +00:00
volumes:
- drone:/var/lib/drone
- drone-data:/data
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
2020-05-08 08:17:57 +00:00
- externalnet
2020-04-02 13:20:50 +00:00
drone-docker-runner:
2020-04-30 11:52:56 +00:00
# drone runner performs builds
2020-04-02 13:20:50 +00:00
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack == yes]
replicas: 1
restart_policy:
condition: any
image: drone/drone-runner-docker:1
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
2020-05-07 14:25:16 +00:00
- DRONE_RPC_PROTO=http
- DRONE_RPC_HOST=drone-server:8080
2020-04-02 13:20:50 +00:00
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
- DRONE_RUNNER_CAPACITY=8
- DRONE_RUNNER_NAME="docker-runner"
2020-05-07 14:03:21 +00:00
networks:
- appnet
2020-04-23 18:23:45 +00:00
drone-starlark:
2020-04-30 11:52:56 +00:00
# drone starlark server converts starlark to yaml
2020-04-23 18:23:45 +00:00
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:
2020-04-30 11:52:56 +00:00
# internal registry
2020-04-02 13:20:50 +00:00
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-02 13:20:50 +00:00
registry-cache:
2020-04-30 11:52:56 +00:00
# registry cache (used?)
2020-04-02 13:20:50 +00:00
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
ghost:
2020-04-30 11:52:56 +00:00
# ghost blog
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-29 21:37:23 +00:00
image: ${LOCAL_DOCKER_REGISTRY}ghost
2020-04-02 13:20:50 +00:00
volumes:
2020-05-06 20:07:16 +00:00
- ghost-content-images:/var/lib/ghost/content/images
- ghost-content-settings:/var/lib/ghost/content/settings
- ghost-content-adapters:/var/lib/ghost/content/adapters
2020-05-06 22:37:20 +00:00
- ghost-content-data:/var/lib/ghost/content/data
- ghost-content-logs:/var/lib/ghost/content/logs
2020-05-06 20:07:16 +00:00
2020-04-02 13:20:50 +00:00
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-05-04 20:49:17 +00:00
- COMMENTO_ORIGIN=$COMMENTO_ORIGIN
2020-05-06 20:36:06 +00:00
- database__client=mysql
- database__connection__host=ghost-mysql
2020-05-06 21:57:15 +00:00
- 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
2020-05-06 20:36:06 +00:00
networks:
- appnet
2020-05-08 08:17:57 +00:00
- externalnet
2020-05-06 20:36:06 +00:00
ghost-mysql:
image: mysql:5.7
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack-data == yes]
replicas: 1
restart_policy:
condition: any
volumes:
- ghost-data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: $GHOST_MYSQL_ROOT_PASSWORD
2020-05-03 22:03:23 +00:00
networks:
- appnet
2020-05-06 20:36:06 +00:00
2020-05-03 22:03:23 +00:00
commento:
deploy:
placement:
2020-05-06 10:33:20 +00:00
constraints: [node.labels.com.sigyl.git-stack-data == yes]
2020-05-03 22:03:23 +00:00
replicas: 1
restart_policy:
condition: any
image: registry.gitlab.com/commento/commento:latest
environment:
COMMENTO_ORIGIN: $COMMENTO_ORIGIN
COMMENTO_SMTP_PASSWORD: $COMMENTO_SMTP_PASSWORD
COMMENTO_ASKIMET_KEY: $COMMENTO_ASKIMET_KEY
COMMENTO_SMTP_HOST: $COMMENTO_SMTP_HOST
COMMENTO_SMTP_PORT: $COMMENTO_SMTP_PORT
COMMENTO_SMTP_USERNAME: $COMMENTO_SMTP_USERNAME
COMMENTO_SMTP_FROM_ADDRESS: $COMMENTO_SMTP_FROM_ADDRESS
2020-05-04 22:13:35 +00:00
COMMENTO_GITHUB_KEY: $COMMENTO_GITHUB_KEY
COMMENTO_GITHUB_SECRET: $COMMENTO_GITHUB_SECRET
2020-05-03 22:03:23 +00:00
COMMENTO_FORBID_NEW_OWNERS: $COMMENTO_FORBID_NEW_OWNERS
COMMENTO_PORT: 8080
2020-05-04 19:26:59 +00:00
COMMENTO_POSTGRES: postgres://${COMMENTO_POSTGRES_USER}:${COMMENTO_POSTGRES_PASSWORD}@commento-postgres:5432/${COMMENTO_POSTGRES_DB}?sslmode=disable
2020-04-02 13:20:50 +00:00
networks:
- appnet
2020-05-08 08:17:57 +00:00
- externalnet
2020-05-03 19:31:30 +00:00
commento-postgres:
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack-data == yes]
replicas: 1
restart_policy:
condition: any
image: postgres:11-alpine
environment:
2020-05-04 19:26:59 +00:00
POSTGRES_DB: ${COMMENTO_POSTGRES_DB}
POSTGRES_USER: ${COMMENTO_POSTGRES_USER}
POSTGRES_PASSWORD: ${COMMENTO_POSTGRES_PASSWORD}
2020-05-03 19:31:30 +00:00
networks:
- appnet
volumes:
2020-05-03 22:03:23 +00:00
- commento-postgresql-data:/var/lib/postgresql/data
2020-04-02 13:20:50 +00:00
guacamole-postgresql:
2020-04-30 11:52:56 +00:00
# database for guacamole
2020-04-02 13:20:50 +00:00
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
2020-05-05 14:19:06 +00:00
nagios:
image: jasonrivers/nagios:latest
deploy:
placement:
2020-05-05 16:24:28 +00:00
constraints: [node.labels.com.sigyl.git-stack == yes]
2020-05-05 14:19:06 +00:00
replicas: 1
restart_policy:
condition: any
2020-05-05 17:46:24 +00:00
environment:
2020-05-05 17:52:40 +00:00
- NAGIOSADMIN_USER=${NAGIOS_ADMIN_USER}
- NAGIOSADMIN_PASS=${NAGIOS_ADMIN_PASSWORD}
2020-05-05 16:29:12 +00:00
volumes:
2020-05-05 18:14:17 +00:00
- ./nagios/conf.d:/opt/nagios/etc/conf.d/
- ./nagios/contacts/contacts.cfg:/opt/nagios/etc/objects/contacts.cfg
2020-05-05 14:19:06 +00:00
networks:
- appnet
2020-05-08 09:28:32 +00:00
- externalnet
2020-05-05 08:31:25 +00:00
matomo:
image: matomo:fpm-alpine
deploy:
placement:
2020-05-06 10:57:58 +00:00
constraints: [node.labels.com.sigyl.git-stack == yes]
2020-05-05 08:31:25 +00:00
replicas: 1
restart_policy:
condition: any
volumes:
# - ./config:/var/www/html/config:rw
# - ./logs:/var/www/html/logs
- matomo:/var/www/html
environment:
- MATOMO_DATABASE_HOST=matomo-mariadb
- MYSQL_PASSWORD=${MATOMO_MYSQL_PASSWORD}
- MYSQL_DATABASE=matomo
- MYSQL_USER=matomo
- MATOMO_DATABASE_ADAPTER=mysql
- MATOMO_DATABASE_TABLES_PREFIX=matomo_
- MATOMO_DATABASE_USERNAME=matomo
- MATOMO_DATABASE_PASSWORD=${MATOMO_MYSQL_PASSWORD}
- MATOMO_DATABASE_DBNAME=matomo
networks:
- appnet
matomo-web:
image: nginx:alpine
deploy:
placement:
2020-05-06 10:57:58 +00:00
constraints: [node.labels.com.sigyl.git-stack == yes]
2020-05-05 08:31:25 +00:00
replicas: 1
restart_policy:
condition: any
volumes:
- matomo:/var/www/html:ro
# see https://github.com/matomo-org/matomo-nginx
- ./matomo/matomo.conf:/etc/nginx/conf.d/default.conf:ro
networks:
- appnet
2020-05-07 20:11:45 +00:00
- externalnet
2020-05-04 22:50:46 +00:00
matomo-mariadb:
deploy:
placement:
2020-05-06 11:06:57 +00:00
constraints: [node.labels.com.sigyl.git-stack-data == yes]
2020-05-04 22:50:46 +00:00
replicas: 1
restart_policy:
condition: any
image: mariadb:10
command: --max-allowed-packet=128MB
networks:
- appnet
volumes:
- matomo-mariadb:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${MATOMO_MYSQL_ROOT_PASSWORD}
2020-05-05 08:55:29 +00:00
MYSQL_USER: matomo
2020-05-04 22:50:46 +00:00
MYSQL_DATABASE: matomo
MYSQL_PASSWORD: ${MATOMO_MYSQL_PASSWORD}
2020-05-05 20:42:03 +00:00
zabbix-mariadb:
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack-data == yes]
replicas: 1
restart_policy:
condition: any
image: mariadb:10
command: --max-allowed-packet=128MB
networks:
- appnet
volumes:
2020-05-05 21:08:39 +00:00
- zabbix-mariadb:/var/lib/mysql
2020-05-05 20:42:03 +00:00
environment:
MYSQL_ROOT_PASSWORD: ${ZABBIX_MYSQL_ROOT_PASSWORD}
MYSQL_USER: zabbix
MYSQL_DATABASE: zabbix
MYSQL_PASSWORD: ${ZABBIX_MYSQL_PASSWORD}
2020-05-05 21:44:51 +00:00
zabbix-server:
deploy:
placement:
2020-05-06 10:33:20 +00:00
constraints: [node.labels.com.sigyl.git-stack-data == yes]
2020-05-05 21:44:51 +00:00
replicas: 1
restart_policy:
condition: any
image: zabbix/zabbix-server-mysql
networks:
- appnet
environment:
DB_SERVER_HOST: zabbix-mariadb
MYSQL_USER: zabbix
MYSQL_PASSWORD: ${ZABBIX_MYSQL_PASSWORD}
networks:
- appnet
2020-05-06 06:45:18 +00:00
ports:
- 10050:10050
2020-05-06 07:38:50 +00:00
- 10051:10051
2020-05-05 22:01:04 +00:00
zabbix-web:
deploy:
placement:
2020-05-06 10:33:20 +00:00
constraints: [node.labels.com.sigyl.git-stack-data == yes]
2020-05-05 22:01:04 +00:00
replicas: 1
restart_policy:
condition: any
image: zabbix/zabbix-web-nginx-mysql
networks:
- appnet
2020-05-08 09:28:32 +00:00
- externalnet
2020-05-05 22:01:04 +00:00
environment:
DB_SERVER_HOST: zabbix-mariadb
MYSQL_USER: zabbix
MYSQL_PASSWORD: ${ZABBIX_MYSQL_PASSWORD}
ZBX_SERVER_HOST: zabbix-server
PHP_TZ: Europe/London
2020-04-02 13:20:50 +00:00
# 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
2020-05-08 08:17:57 +00:00
- externalnet
2020-04-02 13:20:50 +00:00
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
2020-05-08 08:17:57 +00:00
- externalnet
2020-04-02 13:20:50 +00:00
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-05-01 13:54:08 +00:00
portainer:
image: portainer/portainer:1.23.2
command: -H tcp://tasks.portainer-agent:9001 --tlsskipverify
# command: -H unix:///var/run/docker.sock
deploy:
replicas: 1
placement:
constraints: [node.role == manager]
restart_policy:
condition: any
volumes:
- /var/run/docker.sock:/var/run/docker.sock
2020-05-01 14:28:18 +00:00
- portainer-data:/data
2020-05-01 13:54:08 +00:00
networks:
#- proxy
- appnet
2020-05-08 08:17:57 +00:00
- externalnet
2020-05-01 13:54:08 +00:00
portainer-agent:
image: portainer/agent:1.5.1
environment:
# REQUIRED: Should be equal to the service name prefixed by "tasks." when
# deployed inside an overlay network
AGENT_CLUSTER_ADDR: tasks.portainer-agent
# AGENT_PORT: 9001
# LOG_LEVEL: debug
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker/volumes:/var/lib/docker/volumes
networks:
- appnet
deploy:
mode: global
placement:
constraints: [node.platform.os == linux]
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-05-03 19:31:30 +00:00
commento-postgresql-data:
2020-04-02 13:20:50 +00:00
ghost-content:
2020-05-06 20:36:06 +00:00
ghost-data:
2020-05-06 20:07:16 +00:00
ghost-content-adapters:
ghost-content-settings:
ghost-content-images:
2020-05-06 22:37:20 +00:00
ghost-content-data:
ghost-content-logs:
2020-04-02 13:20:50 +00:00
mongo-chat:
chat-uploads:
2020-05-01 14:28:18 +00:00
portainer-data:
2020-05-05 08:31:25 +00:00
matomo:
2020-05-04 22:50:46 +00:00
matomo-mariadb:
2020-05-05 21:08:39 +00:00
zabbix-mariadb:
2020-04-02 13:20:50 +00:00
networks:
appnet:
driver: overlay
#external: true
2020-05-07 20:11:45 +00:00
externalnet:
driver: overlay
external: true
2020-04-02 13:20:50 +00:00
secrets:
'registry-cert':
file: .certificates/registry.crt
'registry-key':
file: .certificates/registry.key