services: << service_name >>-init: image: guacamole/guacamole:1.6.0 container_name: << service_name >>-init user: "0:0" entrypoint: ["/bin/sh", "-c"] command: - if [ ! -s /init/001-initdb.sql ]; then /opt/guacamole/bin/initdb.sh --postgresql > /init/001-initdb.sql; fi volumes: - guacamole-init:/init restart: "no" << service_name >>-db: image: postgres:16-alpine container_name: << service_name >>-db environment: - POSTGRES_DB=guacamole - POSTGRES_USER=guacamole - POSTGRES_PASSWORD=<< db_password >> volumes: - << appdata_dir >>/<< service_name >>/db:/var/lib/postgresql/data - guacamole-init:/docker-entrypoint-initdb.d:ro depends_on: << service_name >>-init: condition: service_completed_successfully healthcheck: test: ["CMD-SHELL", "pg_isready -U guacamole -d guacamole"] interval: 10s timeout: 5s retries: 10 restart: unless-stopped << service_name >>-guacd: image: guacamole/guacd:1.6.0 container_name: << service_name >>-guacd restart: unless-stopped << service_name >>: image: guacamole/guacamole:1.6.0 container_name: << service_name >> ports: - "<< port >>:8080" environment: - WEBAPP_CONTEXT=ROOT - GUACD_HOSTNAME=<< service_name >>-guacd - POSTGRESQL_HOSTNAME=<< service_name >>-db - POSTGRESQL_DATABASE=guacamole - POSTGRESQL_USERNAME=guacamole - POSTGRESQL_PASSWORD=<< db_password >> depends_on: << service_name >>-db: condition: service_healthy << service_name >>-guacd: condition: service_started restart: unless-stopped volumes: guacamole-init: