In this Tutorial we are going to prepare a Docker compose files for running Guacamole in a Browser.
In this Tutorial we are going to install Guacamole as a Docker container in our Homelab.
These steps are explained in this video:
1️⃣ Forward ports on your Router
2️⃣ Add A-Records
3️⃣ Add NPM Proxy Hosts
4️⃣ Clone latest Sources
You can execute the recreate.sh script:
$TF_VAR_PATH_APP/docker/$TF_VAR_GEACAMOLE_NAME/recreate.sh
Tutorials/SS/SS.APP/docker/guacamole/recreate.sh
Lines 1 to 13 in b8d3296
#!/bin/bash | |
# Initialize database | |
$TF_VAR_PATH_APP/docker/$TF_VAR_GUACAMOLE_NAME/init_db.sh | |
# Clean Previous | |
$TF_VAR_COT compose -f $TF_VAR_PATH_APP/docker/$TF_VAR_GUACAMOLE_NAME/docker-compose.yaml down | |
rm -rf $HOME/docker/$TF_VAR_GUACAMOLE_NAME | |
# Compose Up | |
$TF_VAR_COT compose -f $TF_VAR_PATH_APP/docker/$TF_VAR_GUACAMOLE_NAME/docker-compose.yaml up -d --wait --build | |
# ⬇️ |
-
Tutorials/SS/SS.APP/docker/guacamole/docker-compose.yaml
Lines 1 to 71 in b8d3296
# user/password: guacadmin/guacadmin version: "3.8" services: guacamole-mysql: # ${TF_VAR_GUACAMOLE_NAME}-${TF_VAR_MYSQL_NAME} extends: service: ${TF_VAR_MYSQL_NAME} file: ${TF_VAR_PATH_APP}/docker/${TF_VAR_MYSQL_NAME}/docker-compose.yaml container_name: ${TF_VAR_GUACAMOLE_NAME}-${TF_VAR_MYSQL_NAME} volumes: - ${TF_VAR_PATH_APP}/docker/${TF_VAR_GUACAMOLE_NAME}/config/${TF_VAR_MYSQL_NAME}/init.sql:/docker-entrypoint-initdb.d/init.sql - $HOME/docker/${TF_VAR_GUACAMOLE_NAME}/${TF_VAR_MYSQL_NAME}/mysql:/var/lib/mysql environment: MYSQL_DATABASE: ${TF_VAR_GUACAMOLE_NAME} networks: - ${TF_VAR_GUACAMOLE_NAME} guacd: # ${TF_VAR_GUACD_NAME} image: ${TF_VAR_DOMAIN}/${TF_VAR_GUACD_NAME}:${TF_VAR_VERSION_DOCKER_GUACD} build: context: . dockerfile: ${TF_VAR_PATH_APP}/docker/${TF_VAR_GUACAMOLE_NAME}/dockerfile_${TF_VAR_GUACD_NAME} args: VERSION: ${TF_VAR_VERSION_DOCKER_GUACD} container_name: ${TF_VAR_GUACD_NAME} restart: unless-stopped volumes: - $HOME/docker/${TF_VAR_GUACAMOLE_NAME}/${TF_VAR_GUACD_NAME}/config:/config - $HOME/docker/${TF_VAR_GUACAMOLE_NAME}/${TF_VAR_GUACD_NAME}/drive:/drive:rw - $HOME/docker/${TF_VAR_GUACAMOLE_NAME}/${TF_VAR_GUACD_NAME}/record:/record:rw # ports: # - ${TF_VAR_GUACD_PORT_EXT}:${TF_VAR_GUACD_PORT_INT} networks: - ${TF_VAR_GUACAMOLE_NAME} guacamole: # ${TF_VAR_GUACAMOLE_NAME} depends_on: guacd: # ${TF_VAR_GUACD_NAME} condition: service_started guacamole-mysql: # ${TF_VAR_GUACAMOLE_NAME}-${TF_VAR_MYSQL_NAME} condition: service_healthy image: ${TF_VAR_DOMAIN}/${TF_VAR_GUACAMOLE_NAME}:${TF_VAR_VERSION_DOCKER_GUACAMOLE} build: context: . dockerfile: ${TF_VAR_PATH_APP}/docker/${TF_VAR_GUACAMOLE_NAME}/dockerfile_${TF_VAR_GUACAMOLE_NAME} args: VERSION: ${TF_VAR_VERSION_DOCKER_GUACAMOLE} container_name: ${TF_VAR_GUACAMOLE_NAME} restart: unless-stopped volumes: - $HOME/docker/${TF_VAR_GUACAMOLE_NAME}/initdb:/data ports: - ${TF_VAR_GUACAMOLE_PORT_EXT}:${TF_VAR_GUACAMOLE_PORT_INT} environment: GUACD_HOSTNAME: ${TF_VAR_GUACD_NAME} GUACD_PORT: ${TF_VAR_GUACD_PORT_INT} MYSQL_HOSTNAME: ${TF_VAR_GUACAMOLE_NAME}-${TF_VAR_MYSQL_NAME} MYSQL_DATABASE: ${TF_VAR_GUACAMOLE_NAME} MYSQL_USER: ${TF_VAR_MYSQL_USER} MYSQL_PASSWORD: ${TF_VAR_MYSQL_PASSWORD} links: - ${TF_VAR_GUACD_NAME} - ${TF_VAR_GUACAMOLE_NAME}-${TF_VAR_MYSQL_NAME} networks: - ${TF_VAR_GUACAMOLE_NAME} networks: guacamole: # ${TF_VAR_GUACAMOLE_NAME} name: ${TF_VAR_GUACAMOLE_NAME} driver: bridge