Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bitbucket 8.16 #7

Open
simont26 opened this issue Dec 28, 2023 · 6 comments
Open

bitbucket 8.16 #7

simont26 opened this issue Dec 28, 2023 · 6 comments

Comments

@simont26
Copy link

agent doesnt generate valid key for 8.16

@marrowsh
Copy link

not even for 8.9

@marrowsh
Copy link

not even for 8.9

sorry. I had to change java version for bitbucket to 1.8 in /opt/java and now it works for me on version 8.9

@simont26
Copy link
Author

brilliant Marrowsh, does it matter which docker image is used?

@marrowsh
Copy link

brilliant Marrowsh, does it matter which docker image is used?

hey @simont26.
I tried the official one from Atlassian on docker hub.
now I used 8.17 version and it still works. but with a warning for java 1.8 deprecation.

@simont26
Copy link
Author

simont26 commented Jan 16, 2024

@marrowsh how did you go about updating the java?

I added using docker run -it --name java8 -v /opt/java8 openjdk:8

this is my docker file

#
#   __   _ __  __            __       __    ____     _____                     
#  / /  (_) /_/ /  __ ______/ /_____ / /_  / __/__  / _/ /__    _____ ________ 
# / _ \/ / __/ _ \/ // / __/  '_/ -_) __/ _\ \/ _ \/ _/ __/ |/|/ / _ `/ __/ -_)
#/_.__/_/\__/_.__/\_,_/\__/_/\_\\__/\__/ /___/\___/_/ \__/|__,__/\_,_/_/  \__/ 
#                                                                              
#   Docker Compose for Run bitbucket
#   Test for bitbucket Server 7.x
#   Need  "my-net" Network for Run this File
#   docker network create --driver bridge --subnet=150.50.50.0/24 my-net

version: '3.4'
services:
  bitbucket:
    image: 'atlassian/bitbucket-server:8.17'  # Use the custom image you built   
    container_name: bitbucket
    hostname: bitbucket
    restart: always
    environment:
      JAVA_HOME: /opt/java8
      BITBUCKET_HOME: /var/atlassian/application-data/bitbucket/
      JAVA_OPTS: '-javaagent:/atlassian-agent.jar'
      JDBC_DRIVER: org.postgresql.Driver
      JDBC_URL: 'jdbc:postgresql://db:5432/bitbucket'
      JDBC_USER: bitbucket
      JDBC_PASSWORD: 'XXX'
      SERVER_SCHEME: 'https'
      SERVER_SECURE: 'true'
      SERVER_PROXY_PORT: '443'
      SERVER_PROXY_NAME: 'XXX'
      JVM_MINIMUM_MEMORY: 2048m
      JVM_MAXIMUM_MEMORY: 6000m

    volumes:
      - bitbucket-Data:/var/atlassian/application-data/bitbucket
      - ./agent/atlassian-agent.bak:/atlassian-agent.jar:ro
      - java8:/opt/java8
    networks:
      my-net:
       aliases:
        - bit
    ports:
      - 7990:7990
      - 7999:7999
  db:
    image: postgres:15
    container_name: bitbucket-database
    hostname: bitbucket-database
    restart: always
    ports:
      - "5432:5432"
    environment:
      POSTGRES_PASSWORD: 'X&/LmRJDsw3wJf<30j39'
      POSTGRES_USER: bitbucket
      POSTGRES_DB: bitbucket
    volumes:
      - bitbucketDbVolume:/var/lib/postgresql/data
    networks:
      my-net:
       aliases:
        - bit-db        
        
volumes:
 bitbucket-Data:
   name: bitbucket-Data
 bitbucketDbVolume:
   name: bitbucketDbVolume

networks:
  my-net:
    external: true

When its setting up i keep getting the same error

image

any help is greatly appreciated!

@marrowsh
Copy link

marrowsh commented Jan 17, 2024

@simont26
This is the part in my compose file that I made changes:
you won't need to define JAVA_HOME
just download the tar file of openjdk 1.8 and extract it on root of the cloned repo. then change its name to java and :
cd java
mkdir openjdk =>the reason for making such a dir is because when you run the docker image you find this path>/opt/java/openjdk
mv * openjdk
now run the compose file for bitbucket.

version: '3.4'
services:
  bitbucket:
    image: "atlassian/bitbucket-server:8.17"
    container_name: bitbucket
    hostname: bitbucket
    restart: always
    environment:
      BITBUCKET_HOME: /var/atlassian/application-data/bitbucket/
      JAVA_OPTS: '-javaagent:/atlassian-agent.jar'
      JDBC_DRIVER: org.postgresql.Driver
      JDBC_URL: 'jdbc:postgresql://db:5432/bitbucket'
      JDBC_USER: bitbucket
      JDBC_PASSWORD: 'X&/LmRJDsw3wJ'
      #SERVER_SCHEME: 'https'
      #SERVER_SECURE: 'true'
      #SERVER_PROXY_PORT: '443'
      #SERVER_PROXY_NAME: 'bitbucket.mysite.com'
      JVM_MINIMUM_MEMORY: 512m
      JVM_MAXIMUM_MEMORY: 2048m

    volumes:
      - bitbucket-Data:/var/atlassian/application-data/bitbucket
      - ./agent/atlassian-agent.bak:/atlassian-agent.jar:ro
      - ./java:/opt/java
    networks:
      my-net:
       aliases:
        - bit
    ports:
      - 7990:7990
      - 7999:7999
     

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants