This repository has been archived on 2023-02-05. You can view files and clone it, but cannot push or open issues or pull requests.
loki/docker-compose.yml

179 lines
5.1 KiB
YAML

version: '2'
volumes:
wiki:
nextcloud:
nextcloud_db:
gitlab_config:
gitlab_logs:
gitlab_data:
letsencrypt:
letsencrypt_html:
runner_main_etc:
runner_main_home:
runner_docker_etc:
runner_docker_home:
services:
# ---------------------------------------------------------------------------
# Static website served at wojciechkozlowski.eu
# ---------------------------------------------------------------------------
html:
container_name: html
image: nginx
volumes:
- ./html/html-wojciechkozlowski.eu/:/usr/share/nginx/html/
restart: always
# ---------------------------------------------------------------------------
# DokuWiki installation available at wiki.wojciechkozlowski.eu
# ---------------------------------------------------------------------------
wiki:
container_name: wiki
build: dokuwiki
image: gitlab.wojciechkozlowski.eu:8443/wojtek/loki/wiki
volumes:
- wiki:/var/dokuwiki-storage
restart: always
# ---------------------------------------------------------------------------
# NextCloud installation available at cloud.wojciechkozlowski.eu
# ---------------------------------------------------------------------------
nextcloud-db:
container_name: nextcloud-db
image: mariadb
volumes:
- nextcloud_db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=nextcloud
- MYSQL_PASSWORD=nextcloud
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
restart: always
nextcloud-app:
container_name: nextcloud-app
image: nextcloud:fpm
links:
- nextcloud-db
volumes:
- nextcloud:/var/www/html
restart: always
nextcloud-cron:
container_name: nextcloud-cron
build: nextcloud/cron
image: gitlab.wojciechkozlowski.eu:8443/wojtek/loki/nextcloud-cron
volumes_from:
- nextcloud-app
restart: always
nextcloud:
container_name: nextcloud
image: nginx
links:
- nextcloud-app
volumes:
- ./nextcloud/nginx.conf:/etc/nginx/nginx.conf:ro
volumes_from:
- nextcloud-app
restart: always
# ---------------------------------------------------------------------------
# GitLab installation available at gitlab.wojciechkozlowski.eu
# ---------------------------------------------------------------------------
gitlab:
container_name: gitlab
image: gitlab/gitlab-ce
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://gitlab.wojciechkozlowski.eu'
registry_external_url 'https://gitlab.wojciechkozlowski.eu:8443'
registry_nginx['ssl_certificate'] = "/etc/letsencrypt/live/wojciechkozlowski.eu/fullchain.pem"
registry_nginx['ssl_certificate_key'] = "/etc/letsencrypt/live/wojciechkozlowski.eu/privkey.pem"
# Add any other gitlab.rb configuration here, each on its own line
ports:
- '2770:22'
- '8443:8443'
volumes:
- gitlab_config:/etc/gitlab
- gitlab_logs:/var/log/gitlab
- gitlab_data:/var/opt/gitlab
- letsencrypt:/etc/letsencrypt
- ./gitlab/ssh_config:/etc/ssh/ssh_config
restart: always
# ---------------------------------------------------------------------------
# Reverse proxy served by Nginx
# ---------------------------------------------------------------------------
proxy:
container_name: proxy
build: proxy
image: gitlab.wojciechkozlowski.eu:8443/wojtek/loki/proxy
ports:
- 80:80
- 443:443
links:
- html
- wiki
- nextcloud
- gitlab
volumes:
- ./proxy/nginx.conf:/etc/nginx/nginx.conf:ro
- ./proxy/nginx-conf.d:/etc/nginx/conf.d:ro
- letsencrypt:/etc/letsencrypt
- letsencrypt_html:/var/www/html
restart: always
# ---------------------------------------------------------------------------
# Certbot container running a cron job to renew certificates.
# ---------------------------------------------------------------------------
certbot:
container_name: certbot
build: certbot
image: gitlab.wojciechkozlowski.eu:8443/wojtek/loki/certbot
volumes:
- letsencrypt:/etc/letsencrypt
- letsencrypt_html:/var/www/html
restart: always
# ---------------------------------------------------------------------------
# Gitlab runners for CI.
# ---------------------------------------------------------------------------
runner-main:
container_name: runner-main
build: runner/main
image: gitlab.wojciechkozlowski.eu:8443/wojtek/loki/runner-main
volumes:
- runner_main_etc:/etc/gitlab-runner
- runner_main_home:/home/gitlab-runner
- /var/run/docker.sock:/var/run/docker.sock
restart: always
docker-dind:
container_name: docker-dind
image: docker:dind
volumes:
- ./runner/docker/hosts:/etc/hosts
privileged: true
restart: always
runner-docker:
container_name: runner-docker
build: runner/docker
image: gitlab.wojciechkozlowski.eu:8443/wojtek/loki/runner-docker
links:
- docker-dind:docker
volumes:
- runner_docker_etc:/etc/gitlab-runner
- runner_docker_home:/home/gitlab-runner
restart: always