Guacamole

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen

docker-compose.yml

# networks
# create a network 'guacamole_net' in mode 'bridged'
networks:
  guacamole_net:
    driver: bridge
  traefik-public:
    external: true

# services
services:
  # guacd
  guacd:
    container_name: guacamole_backend
    image: guacamole/guacd:latest
    networks:
      guacamole_net:
    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
    networks:
      guacamole_net:
    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
    links:
    - guacd
    networks:
      - guacamole_net
      - traefik-public
    restart: always
    volumes:
    - ./drive:/drive:rw
    labels:
     - "com.ouroboros.enable=true"
     - "traefik.enable=true"
     - "traefik.http.services.guacamole.loadbalancer.server.port=8080"
     - "traefik.http.routers.guacamole-secured.entrypoints=websecure"
     - "traefik.http.routers.guacamole-secured.rule=Host(`guacamole.xinux.net`)"
     - "traefik.http.routers.guacamole-secured.tls=true"