You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
We are running Jira in a docker container and use docker-compose to define the service stack including the RDBMS, we use MySQL in this case.
We would like to override the database connectivity as provided in /var/jira/dbconfig.xml with values specified in docker-compose.yml.
We found sample code on github that seems to demonstrate that overriding database connectivity can be achieved by setting environment variables in the docker-compose file like this:
services:
int-jira:
image: haxqer/jira
container_name: int-jira
environment:
- TZ='Europe/Vienna'
- JIRA_DATABASE_URL=jdbc:mysql://localhost:14306/int_jira
- JIRA_DB_USER=int_jira
- JIRA_DB_PASSWORD=#####
depends_on:
- int-mysql
ports:
- 14080:8080
volumes:
- ~/jira_data:/var/jira
restart: always
networks:
- int_ods_network
When we startup Jira, we find that it still sets up a connectivity to the H2 database as specified in dbconfig.xml.
What would be the correct approach to configure the database in docker-compose, such that the configuration is respected by Jira running in the corresponding container?