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

Staging → Main #118

Merged
merged 28 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
07671ea
build(deps-dev): bump @nestjs/testing from 10.2.2 to 10.2.3
dependabot[bot] Aug 31, 2023
ce163d8
Merge pull request #84 from frontendnetwork/dependabot/npm_and_yarn/n…
kodiakhq[bot] Aug 31, 2023
766c063
build(deps): bump @nestjs/platform-express from 10.2.2 to 10.2.3
dependabot[bot] Aug 31, 2023
87573da
Merge pull request #85 from frontendnetwork/dependabot/npm_and_yarn/n…
kodiakhq[bot] Aug 31, 2023
f2789f9
build(deps): bump @nestjs/common from 10.2.2 to 10.2.3
dependabot[bot] Aug 31, 2023
76d0037
Merge pull request #87 from frontendnetwork/dependabot/npm_and_yarn/n…
kodiakhq[bot] Aug 31, 2023
0b8fbba
build(deps): bump express-rate-limit from 6.9.0 to 6.10.0
dependabot[bot] Aug 31, 2023
7852b48
build(deps): bump @nestjs/core from 10.2.2 to 10.2.3
dependabot[bot] Aug 31, 2023
32daca0
Merge pull request #86 from frontendnetwork/dependabot/npm_and_yarn/n…
kodiakhq[bot] Aug 31, 2023
76ceae2
build(deps): bump @nestjs/config from 3.0.0 to 3.0.1
dependabot[bot] Sep 1, 2023
62c7270
Merge pull request #89 from frontendnetwork/dependabot/npm_and_yarn/n…
kodiakhq[bot] Sep 1, 2023
f900283
build(deps-dev): bump @nestjs/testing from 10.2.3 to 10.2.4
dependabot[bot] Sep 1, 2023
09fc52e
Merge pull request #90 from frontendnetwork/dependabot/npm_and_yarn/n…
kodiakhq[bot] Sep 1, 2023
d960d2d
build(deps-dev): bump @nestjs/cli from 10.1.16 to 10.1.17
dependabot[bot] Sep 1, 2023
db5ec6a
Merge pull request #91 from frontendnetwork/dependabot/npm_and_yarn/n…
kodiakhq[bot] Sep 1, 2023
79b8e7a
build(deps): bump @nestjs/platform-express from 10.2.3 to 10.2.4
dependabot[bot] Sep 1, 2023
37449e7
Merge pull request #93 from frontendnetwork/dependabot/npm_and_yarn/n…
kodiakhq[bot] Sep 1, 2023
1bec161
build(deps): bump @nestjs/common from 10.2.3 to 10.2.4
dependabot[bot] Sep 1, 2023
39af1fb
Merge pull request #92 from frontendnetwork/dependabot/npm_and_yarn/n…
kodiakhq[bot] Sep 1, 2023
efbbb5c
build(deps): bump @nestjs/core from 10.2.3 to 10.2.4
dependabot[bot] Sep 1, 2023
4198183
Merge pull request #94 from frontendnetwork/dependabot/npm_and_yarn/n…
kodiakhq[bot] Sep 1, 2023
b39f0d3
Merge pull request #88 from frontendnetwork/dependabot/npm_and_yarn/e…
philipbrembeck Sep 1, 2023
47b5951
build(deps-dev): bump @types/lodash from 4.14.197 to 4.14.198
dependabot[bot] Sep 6, 2023
42c2952
Merge pull request #98 from frontendnetwork/dependabot/npm_and_yarn/t…
kodiakhq[bot] Sep 6, 2023
8a3a8cb
build(deps): bump express-rate-limit from 6.10.0 to 6.11.0
dependabot[bot] Sep 7, 2023
ac1ddbd
Merge pull request #99 from frontendnetwork/dependabot/npm_and_yarn/e…
philipbrembeck Sep 9, 2023
ea6980a
CI: added Docker-compose
philipbrembeck Oct 19, 2023
0f77075
CI: Added Docker steps
philipbrembeck Oct 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 44 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Default GitHub build&push workflow
# Docs: https://docs.github.com/en/actions/publishing-packages/publishing-docker-images#publishing-images-to-github-packages

name: Create and publish a Docker image
name: Publish Docker image + Deploy

on:
push:
branches:
- main
- release
- staging
- main
- release
- staging

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-prod:
if: github.ref != 'refs/heads/staging'
Expand Down Expand Up @@ -44,13 +44,32 @@ jobs:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
id: build-prod
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}


deploy-prod:
needs: build-and-push-prod
if: success() && github.ref != 'refs/heads/staging'
runs-on: ubuntu-latest

steps:
- name: SSH into the server and run Docker Compose
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd vegancheck
docker-compose stop vc-backend
docker-compose pull vc-backend
docker-compose up -d vc-backend

build-and-push-staging:
if: github.ref == 'refs/heads/staging'
runs-on: ubuntu-latest
Expand Down Expand Up @@ -80,9 +99,28 @@ jobs:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
id: build-staging
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

deploy-staging:
needs: build-and-push-staging
if: success() && github.ref == 'refs/heads/staging'
runs-on: ubuntu-latest

steps:
- name: SSH into the server and run Docker Compose
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd vegancheck
docker-compose stop vc-backend
docker-compose pull vc-backend
docker-compose up -d vc-backend
79 changes: 34 additions & 45 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"license": "MIT",
"dependencies": {
"@nestjs/axios": "^3.0.0",
"@nestjs/common": "^10.2.2",
"@nestjs/config": "^3.0.0",
"@nestjs/core": "^10.2.2",
"@nestjs/platform-express": "^10.2.2",
"@nestjs/common": "^10.2.4",
"@nestjs/config": "^3.0.1",
"@nestjs/core": "^10.2.4",
"@nestjs/platform-express": "^10.2.4",
"@nestjs/swagger": "^7.1.10",
"@types/axios": "^0.14.0",
"@types/body-parser": "^1.19.2",
Expand All @@ -33,7 +33,7 @@
"dom-parser": "^0.1.6",
"dotenv": "^16.3.1",
"express": "^4.18.2",
"express-rate-limit": "^6.9.0",
"express-rate-limit": "^6.11.0",
"http": "^0.0.1-security",
"iconv-lite": "^0.6.3",
"ini": "^4.1.1",
Expand All @@ -56,13 +56,13 @@
"xmldom": "^0.6.0"
},
"devDependencies": {
"@nestjs/cli": "^10.1.16",
"@nestjs/cli": "^10.1.17",
"@nestjs/schematics": "^10.0.2",
"@nestjs/testing": "^10.2.2",
"@nestjs/testing": "^10.2.4",
"@types/express": "^4.17.17",
"@types/js-yaml": "^4.0.5",
"@types/jsdom": "^21.1.2",
"@types/lodash": "^4.14.197",
"@types/lodash": "^4.14.198",
"@types/nodemailer": "^6.4.9",
"@types/pump": "^1.1.1",
"@types/request": "^2.48.8",
Expand Down