hacker342
@hacker342
Like Linux

Как связать confluence + jira в Docker?

Развернул jira, confluence и nginx в Docker. Настроил прокси, но confluence не может подключиться к Jira Server
5fd39eaa7bd83833060989.png

Вот мой docker-compose.yml файл:
version: "3"
services:
  nginx:
    restart: unless-stopped
    image: nginx:1.15-alpine
    ports:
    - 80:80
    - 443:443
    command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
    volumes:
    - ./configs/nginx:/etc/nginx/conf.d
    - ./logs/nginx:/var/log/nginx
    - ./configs/certbot/conf:/etc/letsencrypt
    - ./configs/certbot/www:/var/www/certbot
    networks: 
    - proxy

  certbot:
    image: certbot/certbot
    entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
    volumes:
    - /etc/localtime:/etc/localtime
    - ./configs/certbot/conf:/etc/letsencrypt
    - ./configs/certbot/www:/var/www/certbot
    - ./configs/certbot/log:/var/log/letsencrypt/
  
  confuence:
    restart: unless-stopped
    image: atlassian/confluence-server:latest
    environment:
    - JVM_MINIMUM_MEMORY=2048m
    - JVM_MAXIMUM_MEMORY=4096m
    - ATL_proxyName=confluence.test.com
    - ATL_proxyPort=443
    - ATL_tomcat_scheme=https
    ports:
    - 8090:8090
    - 8091:8091
    volumes:
    - ./atlassian/confuence:/var/atlassian/application-data/confuence
    networks:
    - jira

  jira-software:
    restart: unless-stopped
    image: atlassian/jira-software:latest
    container_name: jira-server
    environment:
    - JVM_MINIMUM_MEMORY=2048m
    - JVM_MAXIMUM_MEMORY=4096m
    - ATL_proxyName=jira.test.com
    - ATL_proxyPort=443
    - ATL_tomcat_scheme=https
    ports:
    - 8080:8080
    volumes:
    - ./atlassian/jira:/var/atlassian/application-data/jira
    networks:
    - jira

networks:
  jira:
  proxy:


jira.conf:
server {
    server_name jira.test.com;

    listen 80;
    listen [::]:80;

    listen              443 ssl;
    listen              [::]:443 ssl;
    ssl_certificate     /etc/letsencrypt/live/jira.test.com/fullchain.pem; 
    ssl_certificate_key /etc/letsencrypt/live/jira.test.com/privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;


    if ($scheme = "http") {
      return 301 https://$server_name$request_uri;
   }

    charset utf-8;
    server_tokens off;

    resolver 127.0.0.11 ipv6=off;
    set $upstream jira.test.com;
   

     location /.well-known/acme-challenge/ {
         root /var/www/certbot;
     }    


    location / {
        proxy_pass_header Authorization;
        proxy_pass http://$upstream:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_http_version 1.1;
        proxy_set_header Connection "";
        proxy_buffering off;
        client_max_body_size 0;
        proxy_read_timeout 36000s;
        proxy_redirect off;
    }
}


confluence.conf:
server {
    server_name confluence.test.com;

    listen 80;
    listen [::]:80;

    listen              443 ssl;
    listen              [::]:443 ssl;
    ssl_certificate     /etc/letsencrypt/live/confluence.test.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/confluence.test.com/privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

    charset utf-8;
    server_tokens off;

    resolver 127.0.0.11 ipv6=off;
    set $upstream confluence.test.com;

   if ($scheme = "http") {
      return 301 https://$server_name$request_uri;
  } 
		
    location /.well-known/acme-challenge/ {
        root /var/www/certbot;
    }


    location / {
        proxy_pass_header Authorization;
        proxy_pass http://$upstream:8090;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_http_version 1.1;
        proxy_set_header Connection "";
        proxy_buffering off;
        client_max_body_size 0;
        proxy_read_timeout 36000s;
        proxy_redirect off;
    }
}


Что необходимо еще прописать? Киньте ссылкой или напишите
  • Вопрос задан
  • 1382 просмотра
Решения вопроса 1
hacker342
@hacker342 Автор вопроса
Like Linux
В общем разобрался.
1. Надо создать сеть.
2. Надо в настройка confluence добавить ip адрес контейнера, а не ip адрес сайта
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы