-
-
Save aadnk/6f5427bbb4fa244f09b9b01e329e44d6 to your computer and use it in GitHub Desktop.
Docker-compose script for setting up Guacamole, with support for file copying
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POSTGRES_USER=dbuser | |
POSTGRES_PASSWORD=changeme | |
POSTGRES_ADMIN_PASSWORD=changeme |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ersion: "3" | |
services: | |
init-guacamole-db: | |
image: guacamole/guacamole:latest | |
command: ["/bin/sh", "-c", "test -e /init/initdb.sql && echo 'init file already exists' || /opt/guacamole/bin/initdb.sh --postgres > /init/initdb.sql" ] | |
volumes: | |
- dbinit:/init | |
postgres: | |
image: postgres:latest | |
restart: unless-stopped | |
volumes: | |
- dbinit:/docker-entrypoint-initdb.d | |
- dbdata:/var/lib/postgresql/data | |
environment: | |
POSTGRES_USER: ${POSTGRES_USER:-guacdb} | |
POSTGRES_PASSWORD: ${POSTGRES_ADMIN_PASSWORD:-guacdb} | |
depends_on: | |
- init-guacamole-db | |
guacd: | |
image: guacamole/guacd:latest | |
restart: unless-stopped | |
volumes: | |
- userhome:/home | |
guac: | |
image: guacamole/guacamole:latest | |
restart: unless-stopped | |
ports: | |
- "8080:8080" | |
environment: | |
GUACD_HOSTNAME: guacd | |
POSTGRES_HOSTNAME: postgres | |
POSTGRES_DATABASE: ${POSTGRES_USER:-guacdb} | |
POSTGRES_USER: ${POSTGRES_USER:-guacdb} | |
POSTGRES_PASSWORD: ${POSTGRES_ADMIN_PASSWORD:-guacdb} | |
depends_on: | |
- postgres | |
- guacd | |
volumes: | |
dbinit: | |
driver: local | |
dbdata: | |
driver: local | |
userhome: | |
driver: local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment