Skip to content

Instantly share code, notes, and snippets.

@darth-veitcher
Created January 7, 2017 21:15
Show Gist options
  • Save darth-veitcher/976bf4d6a37af0a788375a6c88ebce63 to your computer and use it in GitHub Desktop.
Save darth-veitcher/976bf4d6a37af0a788375a6c88ebce63 to your computer and use it in GitHub Desktop.
self-hosted atlassian confluence with reverse proxy via CaddyServer

Atlassian Confluence Setup

http://thegaragelab.com/getting-organised-jira-confluence-and-gitlab-for-a-home-workshop/ https://bitbucket.org/atlassian/docker-atlassian-confluence-server https://hub.docker.com/r/atlassian/confluence-server/

Create directory structure

cd /data
mkdir -p confluence && cd confluence
mkdir -p {data}

Now run server

docker run --detach \
    --hostname my.domain.tld \
    --publish 127.0.0.1:8090:8090 --publish 127.0.0.1:2300:22 \
    --name confluence \
    --volume /data/confluence/data:/var/atlassian/application-data/confluence \
    atlassian/confluence-server

Edit Caddy

my.domain.tld {
    log docs.access.log {
        rotate
    }

    errors {
        log docs.errors.log
    }

    tls [email protected]

    proxy / 127.0.0.1:8090 {
        fail_timeout 300s

        proxy_header Host {host}
        proxy_header X-Real-IP {remote}
        proxy_header X-Forwarded-Proto {scheme}
        proxy_header X-Forwarded-Ssl on
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment