Advertisement
Guest User

Untitled

a guest
Jun 14th, 2018
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.41 KB | None | 0 0
  1. version: '3'
  2.  
  3. services:
  4.   init-guac-db:
  5.     container_name: init-guac-db
  6.     image: guacamole/guacamole:latest
  7.     command: ["/bin/sh", "-c", "test -e /init/initdb.sql && echo 'init file already exists' || /opt/guacamole/bin/initdb.sh --postgres > /init/initdb.sql" ]
  8.     volumes:
  9.       - dbinit:/init
  10.  
  11.  
  12.   postgres:
  13.     container_name: postgres
  14.     image: postgres:latest
  15.     restart: always
  16.     volumes:
  17.       - dbinit:/docker-entrypoint-initdb.d
  18.       - dbdata:/var/lib/postgresql/data
  19.     environment:
  20.       POSTGRES_USER: guacuser
  21.       POSTGRES_PASSWORD: mypassword
  22.     depends_on:
  23.       - init-guac-db
  24.     network_mode: bridge
  25.  
  26.   guacd:
  27.     container_name: guacd
  28.     image: guacamole/guacd:latest
  29.     restart: always
  30.     network_mode: bridge
  31.  
  32.   guacamole:
  33.     container_name: guacamole
  34.     image: guacamole/guacamole:latest
  35.     restart: always
  36.     environment:
  37.       GUACD_HOSTNAME: guacd
  38.       POSTGRES_HOSTNAME: postgres
  39.       POSTGRES_DATABASE: guacuser
  40.       POSTGRES_USER: guacuser
  41.       POSTGRES_PASSWORD: mypassword
  42.     ports:
  43.       - 8585:8080
  44.     depends_on:
  45.       - postgres
  46.       - guacd
  47.     labels:
  48.       traefik.enable: "true"
  49.       traefik.frontend.redirect.entryPoint: "https"
  50.       traefik.frontend.rule: "Host:guacamole.mydomain.com; guac.mydomain.com; AddPrefix: /guacamole"
  51.       traefik.port: "8080"
  52.     network_mode: bridge
  53.  
  54.  
  55. volumes:
  56.   dbinit:
  57.   dbdata:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement