Skip to content

Instantly share code, notes, and snippets.

@nicoulaj
Last active April 8, 2021 05:50
Show Gist options
  • Save nicoulaj/cbf475ea34f227fb650083c711ec8f14 to your computer and use it in GitHub Desktop.
Save nicoulaj/cbf475ea34f227fb650083c711ec8f14 to your computer and use it in GitHub Desktop.
Guacamole docker
version: '2.2'
networks:
traefik:
external: true
guacamole:
external: true
services:
guacamole:
container_name: guacamole
image: guacamole/guacamole
restart: always
cpu_percent: 80
mem_limit: 1G
depends_on:
- guacd
- database
labels:
- traefik.enable=true
- traefik.docker.network=traefik
- traefik.frontend.rule=Host:guacamole.XXXX.tld;AddPrefix:/guacamole
- traefik.port=8080
environment:
- GUACD_HOSTNAME=guacd
- GUACAMOLE_HOME=/etc/guacamole-home
- MYSQL_HOSTNAME=database
- MYSQL_DATABASE=guacamole
- MYSQL_USER=guacamole
- MYSQL_PASSWORD=XXXXXX
volumes:
- ./home:/etc/guacamole-home:ro
- /etc/localtime:/etc/localtime:ro
networks:
- guacamole
- traefik
guacd:
container_name: guacamole_guacd
image: guacamole/guacd
restart: always
environment:
- GUACD_LOG_LEVEL=warning
volumes:
- /var/lib/guacamole/drive:/drive:rw
- /var/lib/guacamole/record:/record:rw
- /etc/localtime:/etc/localtime:ro
networks:
- guacamole
database:
container_name: guacamole_database
image: mariadb
restart: always
cpu_percent: 80
mem_limit: 128M
environment:
- MYSQL_DATABASE=guacamole
- MYSQL_USER=guacamole
- MYSQL_PASSWORD=XXXXXXX
- MYSQL_ROOT_PASSWORD=XXXXXXX
volumes:
- ./init:/docker-entrypoint-initdb.d:ro
- /var/lib/guacamole/database:/var/lib/mysql
- /etc/localtime:/etc/localtime:ro
networks:
- guacamole
docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --mysql | sudo tee init/initdb.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment