-
-
Save Alexlambertz/d2f7aeaca8d4838b819f64c6106148f3 to your computer and use it in GitHub Desktop.
Setup Apache Guacamole using docker-compose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POSTGRES_USER=gua | |
POSTGRES_PASSWORD=<PASSWORD> | |
POSTGRES_DB=gua |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.9" | |
services: | |
app: | |
image: guacamole/guacamole | |
restart: always | |
ports: | |
- "127.0.0.1:8080:8080" | |
volumes: | |
- "./config:/config" | |
environment: | |
- POSTGRES_DATABASE=${POSTGRES_DB} | |
- POSTGRES_USER=${POSTGRES_USER} | |
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD} | |
- GUACD_HOSTNAME=guacd | |
- POSTGRES_HOSTNAME=postgres | |
guacd: | |
image: guacamole/guacd | |
restart: always | |
postgres: | |
image: postgres | |
restart: always | |
environment: | |
- POSTGRES_USER=${POSTGRES_USER} | |
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD} | |
- POSTGRES_DB=${POSTGRES_DB} | |
- PGDATA=/var/lib/postgresql/data | |
volumes: | |
- "./data:/var/lib/postgresql/data" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream application { | |
server localhost:8080; | |
} | |
server { | |
# The host name to respond to | |
server_name sub.domain.tld; | |
# disable cache | |
# add_header Cache-Control "no-cache, must-revalidate, max-age=0"; | |
# change header values | |
location / { | |
proxy_pass http://application; | |
proxy_pass_request_headers on; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_redirect $scheme://$host:8080 $scheme://$host:80; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "Upgrade"; | |
proxy_http_version 1.1; | |
} | |
# custom logs | |
access_log /var/log/nginx/sub.domain.tld.access.log; | |
error_log /var/log/nginx/sub.domain.tld.error.log; | |
listen [::]:443 ssl ipv6only=on; # managed by Certbot | |
listen 443 ssl; # managed by Certbot | |
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot | |
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment