52 lines
1.3 KiB
YAML
52 lines
1.3 KiB
YAML
version: '2'
|
|
services:
|
|
database:
|
|
image: mariadb
|
|
environment:
|
|
MYSQL_DATABASE: ${guacamole_db}
|
|
MYSQL_ONETIME_PASSWORD: 'true'
|
|
MYSQL_PASSWORD: ${guacamole_password}
|
|
MYSQL_RANDOM_ROOT_PASSWORD: 'true'
|
|
MYSQL_USER: ${guacamole_user}
|
|
volumes_from:
|
|
- db-data
|
|
labels:
|
|
io.rancher.sidekicks: setup-get-db-script,db-data
|
|
setup-get-db-script:
|
|
image: glyptodon/guacamole
|
|
network_mode: none
|
|
volumes_from:
|
|
- db-data
|
|
command:
|
|
- bash
|
|
- -c
|
|
- /opt/guacamole/bin/initdb.sh --mysql > /docker-entrypoint-initdb.d/initdb.sql
|
|
labels:
|
|
io.rancher.container.start_once: 'true'
|
|
db-data:
|
|
image: mariadb
|
|
network_mode: none
|
|
volumes:
|
|
- /var/lib/mysql
|
|
- /docker-entrypoint-initdb.d
|
|
command:
|
|
- /bin/echo
|
|
labels:
|
|
io.rancher.container.start_once: 'true'
|
|
guacd:
|
|
image: glyptodon/guacd
|
|
guacamole:
|
|
image: glyptodon/guacamole
|
|
environment:
|
|
MYSQL_DATABASE: ${guacamole_db}
|
|
MYSQL_HOSTNAME: database
|
|
MYSQL_PASSWORD: ${guacamole_password}
|
|
MYSQL_USER: ${guacamole_user}
|
|
links:
|
|
- guacd:guacd
|
|
ports:
|
|
- ${public_port}:8080/tcp
|
|
command:
|
|
- /bin/bash
|
|
- -c
|
|
- cd /usr/local/tomcat/webapps;rm -rf ROOT/; ln -s guacamole.war ROOT.war; /opt/guacamole/bin/start.sh; |