docker-machine create --driver virtualbox atlassian (1)
docker-machine start atlassian (2)
eval `docker-machine env atlassian` (3)-
Create a docker machine (once only)
-
Start the docker machine
-
Setup the docker client to use the docker-machine
The defaults configured by docker-compose.yml and postgresdb.yml will give us a Confluence container and a Postgresdb container.
.envCOMPOSE_PROJECT_NAME=confluence
COMPOSE_FILE=docker-compose.yml:postgresdb.yml
COMPOSE_HTTP_TIMEOUT=300
CONFLUENCE_HTTP_PORT=18090
CONFLUENCE_TAG=6.9.1
CONFLUENCE_VERSION=6.9.1
CONFLUENCE_JDBC_USER=***
CONFLUENCE_JDBC_PASSWORD=***
CATALINA_OPTS=-Xmx2g
POSTGRES_USER=***
POSTGRES_PASSWORD=***A locally built image softwarecraftsmen/oracle-java:8-jdk must be available.
See https://bitbucket.org/SoftwareCraftsmen/docker-oracle-java8.
export CONFLUENCE_TAG=6.8.2
docker-compose build --build-arg CONFLUENCE_VERSION=6.8.2docker-compose up -dStartup after creating a container takes some time as the installation and configuration process is continuing. So be patient until the start page for finishing the installation. You will have to connect the Confluence instance to the Postgresdb instance and add the license details.
To open the Confluence start page, on Mac OSX run open http://$(docker-machine ip atlassian):8090
Once a license has been installed into the server it is bound to the server’s ID.
The license and server ID can be retrieved through http://my.atlassian.com.
So when creating a new container and a valid license still exist the server ID can be set with confluence.cfg.xml in the confluence home dir (/var/atlassian/application-data/confluence).
COMPOSE_FILE=docker-compose.yml:postgresdb.yml:nginx.yml
NGINX_SERVER_NAME=sub-domain.software-craftsmen.at
NGINX_HTTP_PORT=80COMPOSE_FILE=docker-compose.yml:postgresdb.yml:nginx.yml:nginx-ssl.yml
NGINX_SERVER_NAME=sub-domain.software-craftsmen.at
NGINX_HTTP_PORT=80
NGINX_HTTPS_PORT=443A https proxy further requires a X.509 certificate and private key file in the following locations:
./.ssl/${NGINX_SERVER_NAME}.crt
./.ssl/${NGINX_SERVER_NAME}.keyBoth files will be mounted into the proxy container as volumes.
Their basename must match the configured ${NGINX_SERVER_NAME}.
A self-signed certificate and key pair can be generated using the generate-ssl-certificate container.
This requires a X.509 certificate subject to be configured.
export X509_CERTIFICATE_SUBJECT="/C=AT/OU=Software Craftsmen Gmbh & CoKG/L=Vienna/[email protected]"
docker-compose -f ssl-certificate.yml run generate-ssl-certificate