diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..d81559d --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,21 @@ +version: '3' +services: + gitbucket: + build: gitbucket_build + container_name: gitbucket + volumes: + - ./gitbucket_data:/gitbucket + ports: + - "8080:8080" + + postgres: + image: postgres:15.5 + container_name: postgres + volumes: + - ./postgres_data/postgres.conf:/etc/postgresql.conf + environment: + POSTGRES_DB: "postgres" + POSTGRES_USER: postgres + POSTGRES_PASSWORD: "postgres" + ports: + - "5432:5432" \ No newline at end of file diff --git a/gitbucket_build/Dockerfile b/gitbucket_build/Dockerfile new file mode 100644 index 0000000..1166cee --- /dev/null +++ b/gitbucket_build/Dockerfile @@ -0,0 +1,17 @@ +FROM openjdk:17 + +MAINTAINER malexple + +ADD https://github.com/gitbucket/gitbucket/releases/download/4.42.1/gitbucket.war /opt/gitbucket.war + +RUN ln -s /gitbucket /root/.gitbucket + +VOLUME /gitbucket + +# Port for web page +EXPOSE 8080 + +# Port for SSH access to git repository (Optional) +EXPOSE 29418 + +CMD ["java", "-jar", "/opt/gitbucket.war"] \ No newline at end of file diff --git a/gitbucket_data/database.conf b/gitbucket_data/database.conf new file mode 100644 index 0000000..7eb1099 --- /dev/null +++ b/gitbucket_data/database.conf @@ -0,0 +1,5 @@ +db { + url = "jdbc:postgresql://postgres:5432/postgres" + user = "postgres" + password = "postgres" +} \ No newline at end of file diff --git a/postgres_data/PG_VERSION b/postgres_data/PG_VERSION new file mode 100644 index 0000000..3f10ffe --- /dev/null +++ b/postgres_data/PG_VERSION @@ -0,0 +1 @@ +15 \ No newline at end of file