Kevin Xu 01aa82ac1c Update docker-compose.yml
Switched to rancher-nfs again.
2017-02-10 21:14:00 -08:00

49 lines
1.2 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:
- dbdata:/var/lib/mysql
- dbinit:/docker-entrypoint-initdb.d
labels:
io.rancher.sidekicks: setup-get-db-script
setup-get-db-script:
image: glyptodon/guacamole
network_mode: none
volumes:
- dbinit:/docker-entrypoint-initdb.d
command:
- bash
- -c
- /opt/guacamole/bin/initdb.sh --mysql > /docker-entrypoint-initdb.d/initdb.sql
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;
volumes:
dbdata:
driver: rancher-nfs
dbinit:
driver: rancher-nfs