Change volume names and working directory

This commit is contained in:
Wojciech Kozlowski 2018-01-25 08:45:11 +00:00
parent b0750e2c50
commit 0c2353f0df
2 changed files with 24 additions and 25 deletions

View File

@ -1,16 +1,16 @@
version: '2' version: '2'
volumes: volumes:
vol_wiki: wiki:
vol_nextcloud: nextcloud:
vol_nextcloud_db: nextcloud_db:
vol_gitlab_config: gitlab_config:
vol_gitlab_logs: gitlab_logs:
vol_gitlab_data: gitlab_data:
vol_letsencrypt: letsencrypt:
vol_letsencrypt_html: letsencrypt_html:
vol_etc_gitlab_runner: runner_main_etc:
vol_home_gitlab_runner: runner_main_home:
services: services:
@ -34,7 +34,7 @@ services:
build: dokuwiki build: dokuwiki
image: gitlab.wojciechkozlowski.eu:8443/wojtek/loki/wiki image: gitlab.wojciechkozlowski.eu:8443/wojtek/loki/wiki
volumes: volumes:
- vol_wiki:/var/dokuwiki-storage - wiki:/var/dokuwiki-storage
restart: always restart: always
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
@ -45,7 +45,7 @@ services:
container_name: nextcloud-db container_name: nextcloud-db
image: mariadb image: mariadb
volumes: volumes:
- vol_nextcloud_db:/var/lib/mysql - nextcloud_db:/var/lib/mysql
environment: environment:
- MYSQL_ROOT_PASSWORD=nextcloud - MYSQL_ROOT_PASSWORD=nextcloud
- MYSQL_PASSWORD=nextcloud - MYSQL_PASSWORD=nextcloud
@ -59,7 +59,7 @@ services:
links: links:
- nextcloud-db - nextcloud-db
volumes: volumes:
- vol_nextcloud:/var/www/html - nextcloud:/var/www/html
restart: always restart: always
nextcloud-cron: nextcloud-cron:
@ -99,10 +99,10 @@ services:
- '2770:22' - '2770:22'
- '8443:8443' - '8443:8443'
volumes: volumes:
- vol_gitlab_config:/etc/gitlab - gitlab_config:/etc/gitlab
- vol_gitlab_logs:/var/log/gitlab - gitlab_logs:/var/log/gitlab
- vol_gitlab_data:/var/opt/gitlab - gitlab_data:/var/opt/gitlab
- vol_letsencrypt:/etc/letsencrypt - letsencrypt:/etc/letsencrypt
- ./gitlab/ssh_config:/etc/ssh/ssh_config - ./gitlab/ssh_config:/etc/ssh/ssh_config
restart: always restart: always
@ -125,8 +125,8 @@ services:
volumes: volumes:
- ./proxy/nginx.conf:/etc/nginx/nginx.conf:ro - ./proxy/nginx.conf:/etc/nginx/nginx.conf:ro
- ./proxy/nginx-conf.d:/etc/nginx/conf.d:ro - ./proxy/nginx-conf.d:/etc/nginx/conf.d:ro
- vol_letsencrypt:/etc/letsencrypt - letsencrypt:/etc/letsencrypt
- vol_letsencrypt_html:/var/www/html - letsencrypt_html:/var/www/html
restart: always restart: always
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
@ -138,8 +138,8 @@ services:
build: certbot build: certbot
image: gitlab.wojciechkozlowski.eu:8443/wojtek/loki/certbot image: gitlab.wojciechkozlowski.eu:8443/wojtek/loki/certbot
volumes: volumes:
- vol_letsencrypt:/etc/letsencrypt - letsencrypt:/etc/letsencrypt
- vol_letsencrypt_html:/var/www/html - letsencrypt_html:/var/www/html
restart: always restart: always
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
@ -151,7 +151,7 @@ services:
build: runner build: runner
image: gitlab.wojciechkozlowski.eu:8443/wojtek/loki/runner image: gitlab.wojciechkozlowski.eu:8443/wojtek/loki/runner
volumes: volumes:
- vol_etc_gitlab_runner:/etc/gitlab-runner - runner_main_etc:/etc/gitlab-runner
- vol_home_gitlab_runner:/home/gitlab-runner - runner_main_home:/home/gitlab-runner
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
restart: always restart: always

View File

@ -1,10 +1,9 @@
[Unit] [Unit]
Description=Dockerised web server Description=Dockerised web server
Require=docker.service
After=docker.service After=docker.service
[Service] [Service]
WorkingDirectory=/root/Dockerfiles WorkingDirectory=/root/Loki
Environment="COMPOSE_HTTP_TIMEOUT=300" Environment="COMPOSE_HTTP_TIMEOUT=300"
ExecStart=/usr/bin/docker-compose up ExecStart=/usr/bin/docker-compose up
ExecStop=/usr/bin/docker-compose down ExecStop=/usr/bin/docker-compose down