- Atlassian Bamboo 5.15.3
- Apache Maven 3.3.9
- NGINX Host SSL certificates are automatically imported into Bamboo's JVM so Atlassian application links can easily be created
Make sure you have a supported database available either as a container or standalone.
It is important that the value of your
NGINX_UNIT_HOSTS environment variable is set to a single value and doesn't
include wildcards or regular expressions as this value will be used by Bamboo to determine the hostname.
It is highly recommended that you use container orchestration software such as Docker Compose when using this NGINX Host unit as several Docker containers are required for operation. This guide will assume that you are using Docker Compose. Additionally, we will use the official PostgreSQL Docker container for our database.
To begin, start with a basic
docker-compose.yml file as described in the
NGINX Host configuration guide. Then, add a
service for the database (named
db-bamboo) and the NGINX Host Bamboo unit (named
bamboo: image: handcraftedbits/nginx-unit-bamboo environment: - NGINX_UNIT_HOSTS=mysite.com - NGINX_URL_PREFIX=/bamboo links: - db-bamboo volumes: - data:/opt/container/shared - /home/me/bamboo:/opt/data/bamboo db-bamboo: image: postgres environment: - POSTGRES_USER=user - POSTGRES_PASSWORD=password - POSTGRES_DB=bamboo volumes: /home/me/db-bamboo:/var/lib/postgresql/data
Observe the following:
- We create a link in
db-bambooin order to allow Bamboo to connect to our database.
- We mount
/opt/data/bamboousing the local directory
/home/me/bamboo. This is the directory where Bamboo stores its data.
- As with any other NGINX Host unit, we mount our data volume, in this case named
For more information on configuring the PostgreSQL container, consult its documentation.
Finally, we need to create a link in our NGINX Host container to the
bamboo container in order to proxy Bamboo. Here
is our final
version: "2.1" volumes: data: services: bamboo: image: handcraftedbits/nginx-unit-bamboo environment: - NGINX_UNIT_HOSTS=mysite.com - NGINX_URL_PREFIX=/bamboo links: - db-bamboo volumes: - data:/opt/container/shared - /home/me/bamboo:/opt/data/bamboo db-bamboo: image: postgres environment: - POSTGRES_USER=user - POSTGRES_PASSWORD=password - POSTGRES_DB=bamboo volumes: /home/me/db-bamboo:/var/lib/postgresql/data proxy: image: handcraftedbits/nginx-host links: - bamboo ports: - "443:443" volumes: - data:/opt/container/shared - /etc/letsencrypt:/etc/letsencrypt - /home/me/dhparam.pem:/etc/ssl/dhparam.pem
This will result in making a Bamboo instance available at
Running the NGINX Host Bamboo Unit
Assuming you are using Docker Compose, simply run
docker-compose up in the same directory as your
docker-compose.yml file. Otherwise, you will need to start each container with
docker run or a suitable
alternative, making sure to add the appropriate environment variables and volume references.
When configuring Bamboo, be sure to select
PostgreSQL as your database,
db-bamboo as the database hostname, and
5432 as the database port if you configured your database according to the previous section.
Please see the NGINX Host documentation for information on the environment variables understood by this unit.