Skip to content

Instantly share code, notes, and snippets.

@Exchizz
Created July 4, 2019 18:35
Show Gist options
  • Save Exchizz/26193e692c38b18e14e58a8b1a18777c to your computer and use it in GitHub Desktop.
Save Exchizz/26193e692c38b18e14e58a8b1a18777c to your computer and use it in GitHub Desktop.
Docker haproxy
version: '2'
volumes:
mysql:
services:
gitlab_app:
image: gitlab/gitlab-ce:11.9.0-ce.0
ports:
- "22:22"
- "5005:5005"
hostname: gitlab.esrl.dk
environment:
VIRTUAL_HOST: "https://gitlab.esrl.dk,http://gitlab.esrl.dk"
EXCLUDE_PORTS: 22,5005,1342,443
FORCE_SSL: "yes"
volumes:
- /srv/gitlab/config:/etc/gitlab
- /srv/gitlab/logs:/var/log/gitlab
- /srv/gitlab/data:/var/opt/gitlab
- /mnt/gitlab/gitlab-backups:/var/opt/gitlab/backups/
restart: always
gitlab-runner:
image: gitlab/gitlab-runner
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /srv/gitlab-runner/config:/etc/gitlab-runner
restart: always
nextcloud_db:
image: mariadb
restart: always
volumes:
- mysql:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_PASSWORD=password
- MYSQL_DATABASE=database
- MYSQL_USER=userna`em
nextcloud_app:
image: nextcloud:15-apache
links:
- nextcloud_db
volumes:
- /srv/nextcloud:/var/www/html
- /mnt/nextcloud/data:/var/www/html/data
restart: always
environment:
VIRTUAL_HOST: "https://nc.esrl.dk,http://nc.esrl.dk"
FORCE_SSL: "yes"
openproject_app:
image: openproject/community:8
volumes:
- /srv/openproject/pgdata:/var/openproject/pgdata
- /srv/openproject/static:/var/openproject/assets
restart: always
expose:
- 8080
environment:
VIRTUAL_HOST: "https://op.esrl.dk, http://op.esrl.dk"
EXCLUDE_PORTS: "80,5432"
FORCE_SSL: "yes"
collabora_app:
image: collabora/code
restart: always
environment:
domain: "nc\\.esrl\\.dk"
extra_params: "--o:ssl.enable=false --o:ssl.termination=true"
username: "username"
password: "passwrd"
VIRTUAL_HOST: "https://collabora.esrl.dk,http://collabora.esrl.dk"
FORCE_SSL: "yes"
haproxy:
image: dockercloud/haproxy
links:
- gitlab_app
- nextcloud_app
- openproject_app
- collabora_app
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /srv/haproxy/ssl/gitlab.esrl.dk.pem:/certs/gitlab.esrl.dk.pem
- /srv/haproxy/ssl/nc.esrl.dk.pem:/certs/nc.esrl.dk.pem
- /srv/haproxy/ssl/collabora.esrl.dk.pem:/certs/collabora.esrl.dk.pem
- /srv/haproxy/ssl/op.esrl.dk.pem:/certs/op.esrl.dk.pem
ports:
- 80:80
- 443:443
environment:
- CERT_FOLDER="/certs/"
gitlab_mirror:
image: registry.esrl.dk:5005/mneerup/gitlab_mirror
ports:
- "25:25"
hostname: gitlab_mirror.mmmi-lab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment