yoshinorin / docker-gitbucket-orchestration

:whale: Docker compose for GitBucket. (Nginx + MySQL)
12 stars 2 forks source link

How to make it accessible on other ports #33

Open asyahana opened 2 years ago

asyahana commented 2 years ago

If I want to be able to access on 8081 instead of port 8080, should I replace all 8080 parts with 8081?

yoshinorin commented 2 years ago

@asyahana Just change the port settings of nginx in docker-compose.yml :)

https://github.com/yoshinorin/docker-gitbucket-orchestration/blob/ce48ba077d4224e59fe46b4b4236ee18bca47fd6/gitbucket/docker-compose.yml#L16

    hostname: nginx
    ports:
-     - "8080:8080"
+     - "8081:8080"
      - "29418:29418"

スクリーンショット 2022-03-18 204032

asyahana commented 2 years ago

Thanks a lot. I've tried it, but the URL redirected after logging in o Gitbucket is 8080. (However, it seems that you can log in, and you can access it with 8081.)

yoshinorin commented 2 years ago

@asyahana How about belows?

1. docker-compose.yaml

https://github.com/yoshinorin/docker-gitbucket-orchestration/blob/b0db217261467f8b9d2c3f89578a254d8f481cf0/gitbucket/docker-compose.yml#L16

    hostname: nginx
    ports:
-     - "8080:8080"
+     - "8081:8081"
      - "29418:29418"

2. nginx.conf

https://github.com/yoshinorin/docker-gitbucket-orchestration/blob/b0db217261467f8b9d2c3f89578a254d8f481cf0/gitbucket/nginx/config/nginx.conf#L41

server {
-    listen           8080;
+    listen           8081;
    server_name      gitbucket;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;