Thank you for reading this post, don't forget to subscribe!
скачать можно тут:
https://github.com/midnight47/docker-compose/tree/master/jira
поднимать буду в docker-compose так как нет домена то буду использовать test.com в компознике комментирую часть отвечающую за nginx-letsencrypt так как домена нет
cat /etc/hosts
192.168.2.93 gitlab.local registry.gitlab.local test.com
cat docker-compose.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
version: '3.9' services: nginx-proxy: container_name: nginx-proxy image: nginx:latest restart: always ports: - 80:80 - 443:443 volumes: - ./configs/nginx/conf.d:/etc/nginx/conf.d - ./configs/nginx/vhost.d:/etc/nginx/vhost.d - ./configs/nginx/html:/usr/share/nginx/html - ./configs/nginx/certs:/etc/nginx/certs:ro networks: - jiranet logging: driver: syslog options: tag: "docker/nginx-proxy" nginx-gen: container_name: nginx-gen image: jwilder/docker-gen restart: always command: -notify-sighup nginx-proxy -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf volumes_from: - nginx-proxy volumes: - ./configs/nginx-gen/nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro - /var/run/docker.sock:/tmp/docker.sock:ro networks: - jiranet logging: driver: syslog options: tag: "docker/nginx-gen" # nginx-letsencrypt: # container_name: nginx-letsencrypt # image: jrcs/letsencrypt-nginx-proxy-companion # restart: always # environment: # NGINX_PROXY_CONTAINER: nginx-proxy # NGINX_DOCKER_GEN_CONTAINER: nginx-gen # volumes_from: # - nginx-proxy # volumes: # - ./configs/nginx/certs:/etc/nginx/certs:rw # - /var/run/docker.sock:/var/run/docker.sock:ro # networks: # - jiranet # logging: # driver: syslog # options: # tag: "docker/nginx-letsencrypt" jira: container_name: jira depends_on: - postgresql image: atlassian/jira-software:8.8.0 command: bash -c "JAVA_OPTS=-javaagent:/crack/atlassian-agent.jar /opt/atlassian/jira/bin/start-jira.sh -fg" networks: - jiranet volumes: - ./volumes/jira_home_update:/var/atlassian/application-data/jira:rw - ./crack:/crack expose: - 8081 - 8080 ports: - 8080:8080 - 8081:8081 environment: - 'ATL_JDBC_URL=jdbc:postgresql://postgresql:5432/jiradb' - 'ATL_JDBC_USER=jiradbuser' - 'ATL_JDBC_PASSWORD=admin' - 'SETENV_JVM_MINIMUM_MEMORY=2048m' - 'SETENV_JVM_MAXIMUM_MEMORY=4096m' - 'JIRA_PROXY_NAME=' - 'JIRA_PROXY_PORT=' - 'JIRA_PROXY_SCHEME=' - VIRTUAL_HOST=test.com - VIRTUAL_PORT=8080 # - LETSENCRYPT_HOST=test.com # - LETSENCRYPT_EMAIL=webmaster@test.com - JVM_MINIMUM_MEMORY=2000m - JVM_MAXIMUM_MEMORY=4000m deploy: resources: limits: cpus: '2.0' memory: 4000M reservations: cpus: '1.0' memory: 2000M postgresql: restart: always image: postgres:11 container_name: pg-jira environment: - POSTGRES_USER=jiradbuser - POSTGRES_PASSWORD=admin - POSTGRES_DB=jiradb volumes: - ./volumes/jira_postgres_update:/var/lib/postgresql/data:rw - /etc/localtime:/etc/localtime:ro networks: - jiranet logging: driver: syslog options: tag: docker/jira_postgres networks: jiranet: driver: bridge |
cat configs/nginx-gen/nginx.tmpl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 |
{{ $CurrentContainer := where $ "ID" .Docker.CurrentContainerID | first }} {{ define "upstream" }} {{ if .Address }} {{/* If we got the containers from swarm and this container's port is published to host, use host IP:PORT */}} {{ if and .Container.Node.ID .Address.HostPort }} # {{ .Container.Node.Name }}/{{ .Container.Name }} server {{ .Container.Node.Address.IP }}:{{ .Address.HostPort }}; {{/* If there is no swarm node or the port is not published on host, use container's IP:PORT */}} {{ else if .Network }} # {{ .Container.Name }} server {{ .Network.IP }}:{{ .Address.Port }}; {{ end }} {{ else if .Network }} # {{ .Container.Name }} server {{ .Network.IP }} down; {{ end }} {{ end }} # If we receive X-Forwarded-Proto, pass it through; otherwise, pass along the # scheme used to connect to this server map $http_x_forwarded_proto $proxy_x_forwarded_proto { default $http_x_forwarded_proto; '' $scheme; } # If we receive X-Forwarded-Port, pass it through; otherwise, pass along the # server port the client connected to map $http_x_forwarded_port $proxy_x_forwarded_port { default $http_x_forwarded_port; '' $server_port; } # If we receive Upgrade, set Connection to "upgrade"; otherwise, delete any # Connection header that may have been passed to this server map $http_upgrade $proxy_connection { default upgrade; '' close; } # Set appropriate X-Forwarded-Ssl header map $scheme $proxy_x_forwarded_ssl { default off; https on; } gzip_types text/plain text/css application/javascript application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; log_format vhost '$host $remote_addr - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent ' '"$http_referer" "$http_user_agent"'; access_log off; {{ if (exists "/etc/nginx/proxy.conf") }} include /etc/nginx/proxy.conf; {{ else }} # HTTP 1.1 support proxy_http_version 1.1; proxy_buffering off; proxy_set_header Host $http_host; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $proxy_connection; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto; proxy_set_header X-Forwarded-Ssl $proxy_x_forwarded_ssl; proxy_set_header X-Forwarded-Port $proxy_x_forwarded_port; # Mitigate httpoxy attack (see README for details) proxy_set_header Proxy ""; {{ end }} {{ $enable_ipv6 := eq (or ($.Env.ENABLE_IPV6) "") "true" }} server { server_name _; # This is just an invalid value which will never trigger on a real hostname. listen 80; {{ if $enable_ipv6 }} listen [::]:80; {{ end }} access_log /var/log/nginx/access.log vhost; return 503; } {{ if (and (exists "/etc/nginx/certs/default.crt") (exists "/etc/nginx/certs/default.key")) }} server { server_name _; # This is just an invalid value which will never trigger on a real hostname. listen 443 ssl http2; {{ if $enable_ipv6 }} listen [::]:443 ssl http2; {{ end }} access_log /var/log/nginx/access.log vhost; return 503; ssl_session_tickets off; ssl_certificate /etc/nginx/certs/default.crt; ssl_certificate_key /etc/nginx/certs/default.key; } {{ end }} {{ range $host, $containers := groupByMulti $ "Env.VIRTUAL_HOST" "," }} {{ $is_regexp := hasPrefix "~" $host }} {{ $upstream_name := when $is_regexp (sha1 $host) $host }} # {{ $host }} upstream {{ $upstream_name }} { {{ range $container := $containers }} {{ $proxy_to_host := coalesce $container.Env.PROXY_TO_HOST "" }} {{ if eq $proxy_to_host "" }} {{ $addrLen := len $container.Addresses }} {{ range $knownNetwork := $CurrentContainer.Networks }} {{ range $containerNetwork := $container.Networks }} {{ if eq $knownNetwork.Name $containerNetwork.Name }} ## Can be connect with "{{ $containerNetwork.Name }}" network {{/* If only 1 port exposed, use that */}} {{ if eq $addrLen 1 }} {{ $address := index $container.Addresses 0 }} {{ template "upstream" (dict "Container" $container "Address" $address "Network" $containerNetwork) }} {{/* If more than one port exposed, use the one matching VIRTUAL_PORT env var, falling back to standard web port 80 */}} {{ else }} {{ $port := coalesce $container.Env.VIRTUAL_PORT "80" }} {{ $address := where $container.Addresses "Port" $port | first }} {{ template "upstream" (dict "Container" $container "Address" $address "Network" $containerNetwork) }} {{ end }} {{ end }} {{ end }} {{ end }} {{ else }} {{ $port := coalesce $container.Env.VIRTUAL_PORT "80" }} server {{$proxy_to_host}}:{{$port}}; {{end}} {{ end }} } {{ $default_host := or ($.Env.DEFAULT_HOST) "" }} {{ $default_server := index (dict $host "" $default_host "default_server") $host }} {{/* Get the VIRTUAL_PROTO defined by containers w/ the same vhost, falling back to "http" */}} {{ $proto := or (first (groupByKeys $containers "Env.VIRTUAL_PROTO")) "http" }} {{/* Get the HTTPS_METHOD defined by containers w/ the same vhost, falling back to "redirect" */}} {{ $https_method := or (first (groupByKeys $containers "Env.HTTPS_METHOD")) "redirect" }} {{/* Get the first cert name defined by containers w/ the same vhost */}} {{ $certName := (first (groupByKeys $containers "Env.CERT_NAME")) }} {{/* Get the best matching cert by name for the vhost. */}} {{ $vhostCert := (closest (dir "/etc/nginx/certs") (printf "%s.crt" $host))}} {{/* vhostCert is actually a filename so remove any suffixes since they are added later */}} {{ $vhostCert := trimSuffix ".crt" $vhostCert }} {{ $vhostCert := trimSuffix ".key" $vhostCert }} {{/* Use the cert specified on the container or fallback to the best vhost match */}} {{ $cert := (coalesce $certName $vhostCert) }} {{ $is_https := (and (ne $https_method "nohttps") (ne $cert "") (exists (printf "/etc/nginx/certs/%s.crt" $cert)) (exists (printf "/etc/nginx/certs/%s.key" $cert))) }} {{ if $is_https }} {{ if eq $https_method "redirect" }} server { server_name {{ $host }}; listen 80 {{ $default_server }}; {{ if $enable_ipv6 }} listen [::]:80 {{ $default_server }}; {{ end }} access_log /var/log/nginx/access.log vhost; return 301 https://$host$request_uri; } {{ end }} server { server_name {{ $host }}; listen 443 ssl http2 {{ $default_server }}; {{ if $enable_ipv6 }} listen [::]:443 ssl http2 {{ $default_server }}; {{ end }} access_log /var/log/nginx/access.log vhost; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS'; ssl_prefer_server_ciphers on; ssl_session_timeout 5m; ssl_session_cache shared:SSL:50m; ssl_session_tickets off; ssl_certificate /etc/nginx/certs/{{ (printf "%s.crt" $cert) }}; ssl_certificate_key /etc/nginx/certs/{{ (printf "%s.key" $cert) }}; {{ if (exists (printf "/etc/nginx/certs/%s.dhparam.pem" $cert)) }} ssl_dhparam {{ printf "/etc/nginx/certs/%s.dhparam.pem" $cert }}; {{ end }} {{ if (ne $https_method "noredirect") }} add_header Strict-Transport-Security "max-age=31536000"; {{ end }} {{ if (exists (printf "/etc/nginx/vhost.d/%s" $host)) }} include {{ printf "/etc/nginx/vhost.d/%s" $host }}; {{ else if (exists "/etc/nginx/vhost.d/default") }} include /etc/nginx/vhost.d/default; {{ end }} location / { {{ if eq $proto "uwsgi" }} include uwsgi_params; uwsgi_pass {{ trim $proto }}://{{ trim $upstream_name }}; {{ else }} proxy_pass {{ trim $proto }}://{{ trim $upstream_name }}; {{ end }} {{ if (exists (printf "/etc/nginx/htpasswd/%s" $host)) }} auth_basic "Restricted {{ $host }}"; auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/%s" $host) }}; {{ end }} {{ if (exists (printf "/etc/nginx/vhost.d/%s_location" $host)) }} include {{ printf "/etc/nginx/vhost.d/%s_location" $host}}; {{ else if (exists "/etc/nginx/vhost.d/default_location") }} include /etc/nginx/vhost.d/default_location; {{ end }} } } {{ end }} {{ if or (not $is_https) (eq $https_method "noredirect") }} server { server_name {{ $host }}; listen 80 {{ $default_server }}; {{ if $enable_ipv6 }} listen [::]:80 {{ $default_server }}; {{ end }} access_log /var/log/nginx/access.log vhost; {{ if (exists (printf "/etc/nginx/vhost.d/%s" $host)) }} include {{ printf "/etc/nginx/vhost.d/%s" $host }}; {{ else if (exists "/etc/nginx/vhost.d/default") }} include /etc/nginx/vhost.d/default; {{ end }} location / { {{ if eq $proto "uwsgi" }} include uwsgi_params; uwsgi_pass {{ trim $proto }}://{{ trim $upstream_name }}; {{ else }} proxy_pass {{ trim $proto }}://{{ trim $upstream_name }}; {{ end }} {{ if (exists (printf "/etc/nginx/htpasswd/%s" $host)) }} auth_basic "Restricted {{ $host }}"; auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/%s" $host) }}; {{ end }} {{ if (exists (printf "/etc/nginx/vhost.d/%s_location" $host)) }} include {{ printf "/etc/nginx/vhost.d/%s_location" $host}}; {{ else if (exists "/etc/nginx/vhost.d/default_location") }} include /etc/nginx/vhost.d/default_location; {{ end }} } } {{ if (and (not $is_https) (exists "/etc/nginx/certs/default.crt") (exists "/etc/nginx/certs/default.key")) }} server { server_name {{ $host }}; listen 443 ssl http2 {{ $default_server }}; {{ if $enable_ipv6 }} listen [::]:443 ssl http2 {{ $default_server }}; {{ end }} access_log /var/log/nginx/access.log vhost; return 500; ssl_certificate /etc/nginx/certs/default.crt; ssl_certificate_key /etc/nginx/certs/default.key; } {{ end }} {{ end }} {{ end }} |
cat configs/nginx/conf.d/my_proxy.conf
1 2 |
proxy_read_timeout 600; client_max_body_size 100M; |
ll crack/atlassian-agent.jar
-rw-rw-r-- 1 mid mid 952K авг 5 17:36 crack/atlassian-agent.jar
docker-compose up -d
переходим на наш тестовый домен
test.com
далее заполняем подключение к нашей базе.
данные можно взять из docker-compose
ждём некоторое время пока пройдёт накатка базы
далее попадаем на ввод лицензии
заходим в наш контейнер
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
==================================================== ======= Atlassian Crack Agent ======= ======= https://zhile.io ======= ======= QQ Group: 30347511 ======= ==================================================== Your license code(Don't copy this line!!!): AAABhA0ODAoPeJx9kl1vgjAUhu/7K0h2XQQWPzBpMgcswQAuQ5ftsuJRu0Ahp8XN/fqBYqLTmPSmH +/b57znPLygMCb1xrD6hu2MH/tj2zUWc89wLMchGwSQ27KqAM1IZCAVzPcVJLwA5s3iOHjzwklEP ASuRSl9roG1QmqNqNUndyQ+qAxF1arYQuaiEBpWRn4UGMu9sdW6UuNe73crcjBFSWIupAbJZQbBT yVw3/02cqk1bBb5EshPlMFKHK2TKIzDeeCTpC6WgLP1QgEqRu0T3B2vCstVnWmz3VBVrvU3RzCvj O685ZkWO2Aaa7jI8vy8q/m9cWuJHRLseF4f8mRrnisgM9xwKdTxqM2liUWD0mZWFj3ilVI3fkGTT 874qhDy6XR5RLsNfI5wp4JUc9SAHUmXWeizKPTTIKGRPei7Q8txbdcZuBctuNX1FHAH2Mifo2lCF 5PXT2ql04im84/BrWG7buNrjdmWK/g/audiaOYEKxSqK68BZTdgu+AOjLH/B+zuCJIwLQIUSyhrQ BMZjV6YUylyuWqNOCauRhICFQCWXUkG3Gs0U1IWco5N8wMduwYY3Q==X02iu |
вставляем его в наше окно для лицензии
заполняем доступы к админке
пропускаем настройка emal
выбираем язык
аватарку
всё можем создавать новый проект
дальше можно отдавать PM пусть играются
отмечу что jira есть минимум 2gb memory
постгресс 120mb memory
nginx несущественно 5-15 мегабайт