From f03c74cd741c5154cd7e991f7f605a44cb0d6ee4 Mon Sep 17 00:00:00 2001 From: Sean Morley Date: Sat, 26 Oct 2024 09:46:14 -0400 Subject: [PATCH 1/5] Add workflows for uploading beta backend and frontend images to GHCR and Docker Hub --- .github/workflows/backend-beta.yml | 46 +++++++++++++++++++++++++++++ .github/workflows/frontend-beta.yml | 46 +++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 .github/workflows/backend-beta.yml create mode 100644 .github/workflows/frontend-beta.yml diff --git a/.github/workflows/backend-beta.yml b/.github/workflows/backend-beta.yml new file mode 100644 index 00000000..a02bbaf1 --- /dev/null +++ b/.github/workflows/backend-beta.yml @@ -0,0 +1,46 @@ +name: Upload beta backend image to GHCR and Docker Hub + +on: + push: + branches: + - development + paths: + - "backend/**" + +env: + IMAGE_NAME: "adventurelog-backend" + +jobs: + upload: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.ACCESS_TOKEN }} + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: set lower case owner name + run: | + echo "REPO_OWNER=${OWNER,,}" >>${GITHUB_ENV} + env: + OWNER: "${{ github.repository_owner }}" + + - name: Build Docker images + run: docker buildx build --platform linux/amd64,linux/arm64 --push -t ghcr.io/$REPO_OWNER/$IMAGE_NAME:beta -t ${{ secrets.DOCKERHUB_USERNAME }}/$IMAGE_NAME:beta ./backend diff --git a/.github/workflows/frontend-beta.yml b/.github/workflows/frontend-beta.yml new file mode 100644 index 00000000..29597ae0 --- /dev/null +++ b/.github/workflows/frontend-beta.yml @@ -0,0 +1,46 @@ +name: Upload beta frontend image to GHCR and Docker Hub + +on: + push: + branches: + - development + paths: + - "frontend/**" + +env: + IMAGE_NAME: "adventurelog-frontend" + +jobs: + upload: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.ACCESS_TOKEN }} + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: set lower case owner name + run: | + echo "REPO_OWNER=${OWNER,,}" >>${GITHUB_ENV} + env: + OWNER: "${{ github.repository_owner }}" + + - name: Build Docker images + run: docker buildx build --platform linux/amd64,linux/arm64 --push -t ghcr.io/$REPO_OWNER/$IMAGE_NAME:beta -t ${{ secrets.DOCKERHUB_USERNAME }}/$IMAGE_NAME:beta ./frontend From 5435208d3ebd9897a1dfe362146b79511139fe4a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 26 Oct 2024 13:47:41 +0000 Subject: [PATCH 2/5] Bump http-proxy-middleware Bumps the npm_and_yarn group with 1 update in the /documentation directory: [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware). Updates `http-proxy-middleware` from 2.0.6 to 2.0.7 - [Release notes](https://github.com/chimurai/http-proxy-middleware/releases) - [Changelog](https://github.com/chimurai/http-proxy-middleware/blob/v2.0.7/CHANGELOG.md) - [Commits](https://github.com/chimurai/http-proxy-middleware/compare/v2.0.6...v2.0.7) --- updated-dependencies: - dependency-name: http-proxy-middleware dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] --- documentation/pnpm-lock.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/documentation/pnpm-lock.yaml b/documentation/pnpm-lock.yaml index 206db9b1..5dbec9ca 100644 --- a/documentation/pnpm-lock.yaml +++ b/documentation/pnpm-lock.yaml @@ -2607,8 +2607,8 @@ packages: http-parser-js@0.5.8: resolution: {integrity: sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==} - http-proxy-middleware@2.0.6: - resolution: {integrity: sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==} + http-proxy-middleware@2.0.7: + resolution: {integrity: sha512-fgVY8AV7qU7z/MmXJ/rxwbrtQH4jBQ9m7kp3llF0liB7glmFeVZFBepQb32T3y8n8k2+AEYuMPCpinYW+/CuRA==} engines: {node: '>=12.0.0'} peerDependencies: '@types/express': ^4.17.13 @@ -8309,7 +8309,7 @@ snapshots: http-parser-js@0.5.8: {} - http-proxy-middleware@2.0.6(@types/express@4.17.21): + http-proxy-middleware@2.0.7(@types/express@4.17.21): dependencies: '@types/http-proxy': 1.17.14 http-proxy: 1.18.1 @@ -10618,7 +10618,7 @@ snapshots: express: 4.21.0 graceful-fs: 4.2.11 html-entities: 2.5.2 - http-proxy-middleware: 2.0.6(@types/express@4.17.21) + http-proxy-middleware: 2.0.7(@types/express@4.17.21) ipaddr.js: 2.2.0 launch-editor: 2.8.0 open: 8.4.2 From 9b28d9a3159fe46d19d579fc7663caaf6f00e403 Mon Sep 17 00:00:00 2001 From: Sean Morley <98704938+seanmorley15@users.noreply.github.com> Date: Fri, 22 Nov 2024 10:01:53 -0500 Subject: [PATCH 3/5] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .github/ISSUE_TEMPLATE/deployment-issue.md | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 .github/ISSUE_TEMPLATE/deployment-issue.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 164784e7..dac71658 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,6 +1,6 @@ --- name: Bug report -about: "Detailed bug reports help me diagnose and fix bugs quicker! Thanks!" +about: Detailed bug reports help me diagnose and fix bugs quicker! Thanks! title: "[BUG]" labels: bug assignees: '' diff --git a/.github/ISSUE_TEMPLATE/deployment-issue.md b/.github/ISSUE_TEMPLATE/deployment-issue.md new file mode 100644 index 00000000..3cdf581a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/deployment-issue.md @@ -0,0 +1,15 @@ +--- +name: Deployment Issue +about: Request helps deploying AdventureLog on your machine. The more details, the + better I can help! +title: "[DEPLOYMENT]" +labels: deployment +assignees: '' + +--- + +## Explain your issue + +## Provide an **obfuscated** `docker-compose.yml` + +## Provide any necessary logs from the containers and browser From a6630b7de2723bc8ff4dfebbc1e6992e187e0ef5 Mon Sep 17 00:00:00 2001 From: Sean Morley <98704938+seanmorley15@users.noreply.github.com> Date: Fri, 22 Nov 2024 10:02:43 -0500 Subject: [PATCH 4/5] Update issue templates --- .github/ISSUE_TEMPLATE/deployment-issue.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/deployment-issue.md b/.github/ISSUE_TEMPLATE/deployment-issue.md index 3cdf581a..fcc8228c 100644 --- a/.github/ISSUE_TEMPLATE/deployment-issue.md +++ b/.github/ISSUE_TEMPLATE/deployment-issue.md @@ -1,6 +1,6 @@ --- name: Deployment Issue -about: Request helps deploying AdventureLog on your machine. The more details, the +about: Request help deploying AdventureLog on your machine. The more details, the better I can help! title: "[DEPLOYMENT]" labels: deployment From b1ec7dc81565e265a85305da68fdd12cafc58be2 Mon Sep 17 00:00:00 2001 From: Sean Morley <98704938+seanmorley15@users.noreply.github.com> Date: Sat, 23 Nov 2024 13:55:48 -0500 Subject: [PATCH 5/5] Update docker-compose-traefik.yaml As described in #345 --- docker-compose-traefik.yaml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/docker-compose-traefik.yaml b/docker-compose-traefik.yaml index 064b998d..c6ebcf79 100644 --- a/docker-compose-traefik.yaml +++ b/docker-compose-traefik.yaml @@ -38,10 +38,10 @@ services: BODY_SIZE_LIMIT: "100000" labels: - "traefik.enable=true" - - "traefik.http.routers.adventurelog.entrypoints=websecure" - - "traefik.http.routers.adventurelog.rule=Host(`yourdomain.com`) && !PathPrefix(`/media`)" # Replace with your domain - - "traefik.http.routers.adventurelog.tls=true" - - "traefik.http.routers.adventurelog.tls.certresolver=letsencrypt" + - "traefik.http.routers.adventurelogweb.entrypoints=websecure" + - "traefik.http.routers.adventurelogweb.rule=Host(`yourdomain.com`) && !PathPrefix(`/media`)" # Replace with your domain + - "traefik.http.routers.adventurelogweb.tls=true" + - "traefik.http.routers.adventurelogweb.tls.certresolver=letsencrypt" server: image: ghcr.io/seanmorley15/adventurelog-backend:latest @@ -61,6 +61,12 @@ services: FRONTEND_URL: "https://yourdomain.com" # Replace with your domain volumes: - adventurelog-media:/code/media + labels: + - "traefik.enable=true" + - "traefik.http.routers.adventurelogserver.entrypoints=websecure" + - "traefik.http.routers.adventurelogserver.rule=Host(`yourdomain.com`) && PathPrefix(`/media`)" # Replace with your domain + - "traefik.http.routers.adventurelogserver.tls=true" + - "traefik.http.routers.adventurelogserver.tls.certresolver=letsencrypt" volumes: postgres-data: