From 5e43447bb23e65413bbd2bd2f3c13f10414cd92d Mon Sep 17 00:00:00 2001 From: Steven Foerster Date: Thu, 25 Feb 2021 20:26:49 -0500 Subject: [PATCH] guac --- extra/guacamole.yml | 52 +++++++++++++++++++++ scripts/services/Mistborn-guacamole.service | 22 +++++++++ 2 files changed, 74 insertions(+) create mode 100644 extra/guacamole.yml create mode 100644 scripts/services/Mistborn-guacamole.service diff --git a/extra/guacamole.yml b/extra/guacamole.yml new file mode 100644 index 0000000..b390bdd --- /dev/null +++ b/extra/guacamole.yml @@ -0,0 +1,52 @@ +version: '3' + +# services +services: + # guacd + guacd: + container_name: mistborn_production_guacd + image: guacamole/guacd + networks: + guacnetwork: + restart: unless-stopped + volumes: + - ../../mistborn_volumes/extra/guacamole/drive:/drive:rw + - ../../mistborn_volumes/extra/guacamole/record:/record:rw + + # guacamole + guacamole: + container_name: mistborn_production_guacamole + labels: + - "traefik.enable=true" + - "traefik.http.routers.onlyoffice-http.rule=Host(`guac.mistborn`)" + - "traefik.http.routers.onlyoffice-http.entrypoints=web" + - "traefik.http.routers.onlyoffice-http.middlewares=mistborn_auth@file" + - "traefik.http.routers.onlyoffice-https.rule=Host(`guac.mistborn`)" + - "traefik.http.routers.onlyoffice-https.entrypoints=websecure" + - "traefik.http.routers.onlyoffice-https.middlewares=mistborn_auth@file" + - "traefik.http.routers.onlyoffice-https.tls.certresolver=basic" + - "traefik.http.services.onlyoffice-service.loadbalancer.server.port=8080" + depends_on: + - guacd + - postgres + environment: + GUACD_HOSTNAME: guacd + env_file: + - ../.envs/.production/.postgres + image: guacamole/guacamole + links: + - guacd + networks: + guacnetwork: + #ports: +## enable next line if not using nginx +## - 8080:8080/tcp # Guacamole is on :8080/guacamole, not /. +## enable next line when using nginx + #- 8080/tcp + restart: unless-stopped + +# networks +# create a network 'guacnetwork' in mode 'bridged' +networks: + guacnetwork: + driver: bridge \ No newline at end of file diff --git a/scripts/services/Mistborn-guacamole.service b/scripts/services/Mistborn-guacamole.service new file mode 100644 index 0000000..9fde853 --- /dev/null +++ b/scripts/services/Mistborn-guacamole.service @@ -0,0 +1,22 @@ +[Unit] +Description=Mistborn Guacamole +Requires=Mistborn-base.service +After=Mistborn-base.service +PartOf=Mistborn-base.service + +[Service] +Restart=always +User=root +Group=docker +PermissionsStartOnly=true +# Shutdown container (if running) when unit is stopped +ExecStartPre=/usr/local/bin/docker-compose -f /opt/mistborn/extra/guacamole.yml down + +# Start container when unit is started +ExecStart=/usr/local/bin/docker-compose -f /opt/mistborn/extra/guacamole.yml up --build +# Stop container when unit is stopped +ExecStop=/usr/local/bin/docker-compose -f /opt/mistborn/extra/guacamole.yml down +# Post stop + +[Install] +WantedBy=multi-user.target