Skip to content

Instantly share code, notes, and snippets.

@Parlane
Created June 26, 2019 23:28
Show Gist options
  • Save Parlane/89702d2cb5d64fce4a43ee9fd34a5a66 to your computer and use it in GitHub Desktop.
Save Parlane/89702d2cb5d64fce4a43ee9fd34a5a66 to your computer and use it in GitHub Desktop.
version: '2'
networks:
public:
ipam:
driver: default
config:
- subnet: "172.12.0.0/16"
internal:
internal: true
ipam:
driver: default
config:
- subnet: "172.13.0.0/16"
services:
# we still run postgres as root with stepdown to uid 70 until this issue is fixed
# https://github.com/docker-library/postgres/issues/264
# and until it's not required to expose host's /etc/passwd to the container
# https://hub.docker.com/_/postgres/ (see "Arbitrary --user Notes")
postgres:
container_name: guac-postgres
image: postgres:9.6.1-alpine
command: postgres -c log_min_duration_statement=500 -c deadlock_timeout=5000
restart: always
networks:
- internal
volumes:
- postgres-data:/var/lib/postgresql/data/pgdata
- /root/initdb.sql:/docker-entrypoint-initdb.d/init.sql
environment:
- POSTGRES_DB=guacamole_db
- POSTGRES_USER=guacamole_user
- POSTGRES_PASSWORD=guacamole_pw
- PGDATA=/var/lib/postgresql/data/pgdata
guac-daemon:
container_name: guacd
image: guacamole/guacd
restart: always
depends_on:
- postgres
networks:
- internal
ports:
- "4822:4822/TCP"
depends_on:
- postgres
guac-frontend:
container_name: guacamole
image: guacamole/guacamole
restart: always
depends_on:
- guac-daemon
- postgres
networks:
- internal
- public
links:
- guac-daemon
ports:
- "8083:8080/TCP"
environment:
- POSTGRES_HOSTNAME=postgres
- POSTGRES_DATABASE=guacamole_db
- POSTGRES_USER=guacamole_user
- POSTGRES_PASSWORD=guacamole_pw
- GUACD_HOSTNAME=guacd
cap_add:
- NET_ADMIN
volumes:
postgres-data:
driver: local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment