Skip to content

Instantly share code, notes, and snippets.

@matiasiglesias
Created July 9, 2022 14:10
Show Gist options
  • Save matiasiglesias/3114775e630aa899c658bb879fd32910 to your computer and use it in GitHub Desktop.
Save matiasiglesias/3114775e630aa899c658bb879fd32910 to your computer and use it in GitHub Desktop.
Jira multi-container Docker
<VirtualHost *:80>
ServerAdmin your@email.com
ServerName YOUR-JIRA-INSTANCE-URL
ServerAlias jira
ProxyRequests Off
<Proxy *>
Order Deny,Allow
Allow from all
</Proxy>
#ProxyPreserveHost on
ProxyPass / http://127.0.0.1:8001/
ProxyPassReverse / http://127.0.0.1:8001/
<Location />
Order allow,deny
Allow from all
</Location>
# Remove this comments to secure connection
# You may install certbot to issua a free SSL certificate
# RewriteEngine on
# RewriteCond %{SERVER_NAME} =jira [OR]
# RewriteCond %{SERVER_NAME} =YOUR-JIRA-INSTANCE-URL
# RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
version: '3'
services:
jira:
container_name: jira
depends_on:
- postgresql
image: atlassian/jira-software:8.20.9
restart: always
networks:
- jiraNet
volumes:
- jiraVolume:/var/atlassian/application-data/jira
ports:
- '8001:8080'
environment:
- 'ATL_JDBC_URL=jdbc:postgresql://postgresql:5432/jiradb'
- 'ATL_JDBC_USER=jira'
- 'ATL_JDBC_PASSWORD=CHANGE_THIS_PASSWORD'
- 'ATL_PROXY_NAME=YOUR-JIRA-INSTANCE-URL'
- 'ATL_PROXY_PORT=443'
- 'ATL_TOMCAT_SCHEME=https'
- 'ATL_TOMCAT_SECURE=true'
- 'SETENV_JVM_MINIMUM_MEMORY=2048m'
- 'SETENV_JVM_MAXIMUM_MEMORY=4096m'
- 'JIRA_PROXY_NAME=YOUR-JIRA-INSTANCE-URL'
- 'JIRA_PROXY_PORT=443'
- 'JIRA_PROXY_SCHEME=https'
- 'JVM_SUPPORT_RECOMMENDED_ARGS=-Djira.downgrade.allowed=true'
postgresql:
container_name: postgres
image: postgres:12
restart: always
expose:
- '5432'
networks:
- jiraNet
volumes:
- postgresData:/var/lib/postgresql/data
ports:
- '5430:5432'
environment:
- 'POSTGRES_USER=jira'
- 'POSTGRES_PASSWORD=CHANGE_THIS_PASSWORD'
- 'POSTGRES_DB=jiradb'
- 'POSTGRES_ENCODING=UNICODE'
- 'POSTGRES_COLLATE=C'
- 'POSTGRES_COLLATE_TYPE=C'
volumes:
jiraVolume:
external: false
postgresData:
external: false
networks:
jiraNet:
driver: bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment