如何在docker模式下更改bitbucket服务器的上下文路径



我正在寻找一种在docker模式下更改比特桶服务器上下文路径的方法,因为我试图在traefik反向代理后面运行它,并希望将我的域用于多个应用程序(每个路径一个(:

我希望我的比特桶服务器通过https://my.domain.name/bitbucket提供服务,我的jira通过https://my.domain.name/jira。。。etc

我已经为其他Atlassian产品(jira、servicedesk和convergence(找到了一个使用反向代理设置ATL_TOMCAT_CONTEXTPATH的解决方案,该环境参数没有在bitbucket服务器docker hub页面中描述。

我的docker群堆栈看起来像这样:

version: '3'
services:
bitbucket-server:
image: atlassian/bitbucket-server:6.7
deploy:
labels:
- "traefik.enable=true"
- "traefik.http.routers.bitbucket-server.entryPoints=websecure"
- "traefik.http.routers.bitbucket-server.rule=Host(`my.domain.name`) && PathPrefix(`/bitbucket`)"
- "traefik.http.services.bitbucket-server.loadbalancer.server.port=7990"
- "traefik.http.routers.bitbucket-server.tls=true"
- "traefik.http.routers.bitbucket-server.tls.certresolver=letsencrypt"
- "traefik.http.routers.bitbucket-server.tls.domains=my.domain.name"
environment:
- ATL_PROXY_NAME=traefik.my.domain.name
- ATL_PROXY_PORT=443
# next line didn't work ! 
# - ATL_TOMCAT_CONTEXTPATH=/bitbucket
volumes:
- bitbucket_data:/var/atlassian/application-data/bitbucket
networks:
- local
- public-proxy
labels:
- description= "Bitbucket"

jira-software:
image: atlassian/jira-software:8.5
deploy:
labels:
- "traefik.enable=true"
- "traefik.http.routers.jira-software.entryPoints=websecure"
- "traefik.http.routers.jira-software.rule=Host(`my.domain.name`) && PathPrefix(`/jira`)"
- "traefik.http.services.jira-software.loadbalancer.server.port=8080"
- "traefik.http.routers.jira-software.tls=true"
- "traefik.http.routers.jira-software.tls.certresolver=letsencrypt"
- "traefik.http.routers.jira-software.tls.domains=my.domain.name"
volumes:
- jira_software_data:/var/atlassian/application-data/jira
environment:
- ATL_PROXY_NAME=traefik.my.domain.name
- ATL_PROXY_PORT=443
# next line did work !
- ATL_TOMCAT_CONTEXTPATH=/jira
- ATL_TOMCAT_SCHEME=https
- ATL_TOMCAT_SECURE=true
networks:
- local
- public-proxy
labels:
- description= "Jira Software"

jira-servicedesk:
image: atlassian/jira-servicedesk:4.5

# ... Same as jira-software
confluence:
image: atlassian/confluence-server:7.1  

# ... Same as jira-software

networks:
local:
public-proxy :
external: true
volumes:
servicedesk_data:
confluence_data:
jira_software_data:
bitbucket_data:

可以通过添加此行从bitbucket.properties配置上下文路径

server.context-path=/bitbucket

在docker环境中,您可以将您的比特桶属性文件装载到您的容器中,这样它就可以取代默认的

volumes:
- YOUR_BITBUCKET_PROPERTIES:<Bitbucket home directory>/shared/bitbucket.properties

相关内容

  • 没有找到相关文章

最新更新