- Creare docker-compose.yml
cat > docker-compose.yml <<EOFile
version: '3.9'
# services
services:
# guacd
guacd:
container_name: guacamole_backend
image: guacamole/guacd:latest
restart: always
volumes:
- ./drive:/drive:rw
- ./record:/record:rw
# postgres
postgres:
container_name: guacamole_database
environment:
PGDATA: /var/lib/postgresql/data/guacamole
POSTGRES_DB: guacamole_db
POSTGRES_PASSWORD: '${POSTGRES_PASSWORD}'
POSTGRES_USER: '${POSTGRES_USER}'
image: postgres:13.4
restart: always
volumes:
- ./init:/docker-entrypoint-initdb.d:ro
- ./data:/var/lib/postgresql/data:rw
# guacamole
guacamole:
container_name: guacamole_frontend
depends_on:
- guacd
- postgres
environment:
GUACD_HOSTNAME: guacd
POSTGRES_DATABASE: guacamole_db
POSTGRES_HOSTNAME: postgres
POSTGRES_PASSWORD: '${POSTGRES_PASSWORD}'
POSTGRES_USER: '${POSTGRES_USER}'
POSTGRESQL_AUTO_CREATE_ACCOUNTS: true
image: guacamole/guacamole:latest
ports:
- 8888:8080/tcp
links:
- guacd
restart: always
volumes:
- ./drive:/drive:rw
EOFile
- Creare il file contente a password di postgres:
cat > .env <<EOFile
POSTGRES_PASSWORD='PleasePutAStrongPasswordHere'
POSTGRES_USER='guacamole_user'
EOFile
- Creare il file di inizializzazione del DB
mkdir init
docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --postgres > init/initdb.sql
docker compose up
guacadmin
guacadmin
- Per cambiare la password, andare su Opzioni/Preferenze
Riferimenti