Add GitLab

This commit is contained in:
Wojciech Kozlowski 2017-09-16 22:39:30 +01:00
parent 884b74f3da
commit 4b4997c34c
7 changed files with 65 additions and 13 deletions

View File

@ -4,14 +4,26 @@ volumes:
vol_wiki: vol_wiki:
vol_nextcloud: vol_nextcloud:
vol_nextcloud_db: vol_nextcloud_db:
vol_gitlab_config:
vol_gitlab_logs:
vol_gitlab_data:
services: services:
# ---------------------------------------------------------------------------
# Static website served at wojciechkozlowski.eu
# ---------------------------------------------------------------------------
html: html:
container_name: docker_html container_name: docker_html
build: html build: html
image: html image: html
restart: always restart: always
# ---------------------------------------------------------------------------
# DokuWiki installation available at wiki.wojciechkozlowski.eu
# ---------------------------------------------------------------------------
wiki: wiki:
container_name: docker_wiki container_name: docker_wiki
build: dokuwiki build: dokuwiki
@ -20,6 +32,10 @@ services:
- vol_wiki:/var/dokuwiki-storage - vol_wiki:/var/dokuwiki-storage
restart: always restart: always
# ---------------------------------------------------------------------------
# NextCloud installation available at cloud.wojciechkozlowski.eu
# ---------------------------------------------------------------------------
nextcloud-db: nextcloud-db:
container_name: nextcloud_db container_name: nextcloud_db
image: mariadb image: mariadb
@ -32,8 +48,8 @@ services:
- MYSQL_USER=nextcloud - MYSQL_USER=nextcloud
restart: always restart: always
nextcloud: nextcloud-app:
container_name: nextcloud container_name: nextcloud_app
image: nextcloud:fpm image: nextcloud:fpm
links: links:
- nextcloud-db - nextcloud-db
@ -41,25 +57,48 @@ services:
- vol_nextcloud:/var/www/html - vol_nextcloud:/var/www/html
restart: always restart: always
nextcloud-web: nextcloud:
container_name: docker_cloud container_name: docker_cloud
image: nginx image: nginx
links: links:
- nextcloud - nextcloud-app
volumes: volumes:
- ./nextcloud/nginx.conf:/etc/nginx/nginx.conf:ro - ./nextcloud/nginx.conf:/etc/nginx/nginx.conf:ro
volumes_from: volumes_from:
- nextcloud - nextcloud-app
restart: always restart: always
# ---------------------------------------------------------------------------
# GitLab installation available at gitlab.wojciechkozlowski.eu
# ---------------------------------------------------------------------------
gitlab:
container_name: docker_gitlab
image: gitlab/gitlab-ce
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://gitlab.wojciechkozlowski.eu'
# Add any other gitlab.rb configuration here, each on its own line
volumes:
- vol_gitlab_config:/etc/gitlab
- vol_gitlab_logs:/var/log/gitlab
- vol_gitlab_data:/var/opt/gitlab
restart: always
# ---------------------------------------------------------------------------
# Reverse proxy served by Nginx
# ---------------------------------------------------------------------------
proxy: proxy:
container_name: proxy container_name: proxy
build: nginx-proxy image: nginx
image: proxy
ports: ports:
- 80:80 - 80:80
links: links:
- html - html
- wiki - wiki
- nextcloud-web - nextcloud
- gitlab
volumes:
- ./proxy/nginx-conf.d:/etc/nginx/conf.d
restart: always restart: always

View File

@ -6,7 +6,7 @@ events {
http { http {
upstream backend { upstream backend {
server nextcloud:9000; server nextcloud_app:9000;
} }
include /etc/nginx/mime.types; include /etc/nginx/mime.types;
default_type application/octet-stream; default_type application/octet-stream;

View File

@ -1,4 +0,0 @@
FROM nginx
RUN rm -rf /etc/nginx/conf.d
ADD nginx-conf.d /etc/nginx/conf.d

View File

@ -0,0 +1,17 @@
server {
listen 80;
server_name gitlab.wojciechkozlowski.eu;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://docker_gitlab;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}