From a2c82030dc34c0072b434de54db7d6d2088f42ff Mon Sep 17 00:00:00 2001 From: manuwei <44226745+manuwei@users.noreply.github.com> Date: Fri, 23 Jul 2021 09:43:53 +0200 Subject: [PATCH 1/3] adapt port --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index cd284ee..3618f21 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ ENV SUBFOLDER_CONTENT_REPO_BACKUP_FILES "db-backup-files" ENV COPY_CONTENT_REPOSITORY_TARGET_PATH "/var/pattern-atlas/testdata" ENV POSTGRES_PASSWORD postgres ENV POSTGRES_USER postgres -ENV JDBC_DATABASE_PORT 5432 +ENV JDBC_DATABASE_PORT 5060 ENV POSTGRES_DB db # install dependencies (git) From 57f821e869bf9ee265f0d7b2ba31ad14df04afce Mon Sep 17 00:00:00 2001 From: manuwei <44226745+manuwei@users.noreply.github.com> Date: Fri, 23 Jul 2021 15:53:47 +0200 Subject: [PATCH 2/3] expose new port, reformatting --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3618f21..0bc9ee9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,11 @@ RUN apt-get update \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* +EXPOSE 5060 + COPY clone-data-repo.sh clone-data-repo.sh # if ssh key is set, clone data repo with the sql scripts for initalization and start postgres afterwards -CMD chmod 700 clone-data-repo.sh && ./clone-data-repo.sh && su postgres -c "/usr/local/bin/docker-entrypoint.sh postgres" +CMD chmod 700 clone-data-repo.sh \ + && ./clone-data-repo.sh \ + && su postgres -c "/usr/local/bin/docker-entrypoint.sh postgres -p ${JDBC_DATABASE_PORT}" From 4bdd68c2abc25b8b13c601840033361f1b664bdb Mon Sep 17 00:00:00 2001 From: manuwei <44226745+manuwei@users.noreply.github.com> Date: Fri, 23 Jul 2021 16:00:53 +0200 Subject: [PATCH 3/3] add dockerhub workflow --- .github/workflows/dockerhub.yml | 42 +++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/dockerhub.yml diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml new file mode 100644 index 0000000..6177246 --- /dev/null +++ b/.github/workflows/dockerhub.yml @@ -0,0 +1,42 @@ +name: Push docker images to Dockerhub + +on: + push: + branches: master + tags: + - "v*.*.*" + +jobs: + multi: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - name: Set output + id: vars + run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Build and push latest Pattern Atlas UI + if: ${{ steps.vars.outputs.tag == 'master' }} + uses: docker/build-push-action@v2 + with: + context: . + push: true + tags: patternatlas/pattern-atlas-db:latest + + - name: Build and push version of Pattern Atlas UI + if: ${{ steps.vars.outputs.tag != 'master' }} + uses: docker/build-push-action@v2 + with: + context: . + push: true + tags: patternatlas/pattern-atlas-db:${{ steps.vars.outputs.tag }}