Skip to content

Commit

Permalink
feat: add backed to ci flow
Browse files Browse the repository at this point in the history
  • Loading branch information
pociej committed Apr 8, 2024
1 parent 5b8c5f2 commit 98d27e4
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 14 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ name: Build and push containers to Github Container Registry and apply rolling u
on:
push:
branches:
- staging
- develop
- main
- base
tags:
- v*

jobs:
build:
Expand All @@ -20,7 +15,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
submodules: "recursive"

- name: Getting image tag
uses: actions/github-script@v6
Expand All @@ -34,7 +29,7 @@ jobs:
run: |
# login to ghcr.io
docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
# build with full metadata
docker build \
--label "org.opencontainers.image.source=https://github.com/${GITHUB_REPOSITORY}" \
Expand All @@ -50,4 +45,4 @@ jobs:
- name: Notify Develop Branch
continue-on-error: true
if: ${{ steps.get_image_tag.outputs.result == 'develop' }}
run: curl http://deposit.dev.golem.network:5000/release/pull
run: curl http://deposit.dev.golem.network:5000/release/pull
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ RUN mkdir /app/temp

RUN pnpm install
RUN pnpm build:all
RUN npm install pm2 -g
4 changes: 2 additions & 2 deletions backend/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "backend",
"name": "deposit:backend",
"version": "1.0.0",
"description": "",
"main": "index.ts",
"scripts": {
"dev": "concurrently -k \"tsc -w\" \"nodemon --env-file=.env.local ./dist/index.js\"",
"build": "tsc",
"run": "node ./dist/index.js"
"start": "pm2 ./dist/index.js"
},
"type": "module",
"keywords": [],
Expand Down
2 changes: 1 addition & 1 deletion docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
dockerfile: Dockerfile
args:
- BACKEND_URL=${BACKEND_URL:-http://127.0.0.1:5174}
command: tail -F anything
command: pnpm run start:app
environment:
- YAGNA_APPKEY=66667777888
- YAGNA_API_URL=http://yagna:7465
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"run": "serve dist -l tcp://0.0.0.0:3000",
"start": "serve dist -l tcp://0.0.0.0:3000",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@
"build:task-executor": "pnpm --filter @golem-sdk/task-executor build",
"build:ya-ts-client": "pnpm --filter ya-ts-client build",
"build:loginWithCrypto": "pnpm --filter loginWithCrypto build",
"build:backend": "pnpm --filter backend build",
"build:backend": "pnpm --filter deposit:backend build",
"build:frontend": "pnpm --filter deposit:frontend build",
"build:all": "pnpm build:loginWithCrypto && pnpm build:ya-ts-client && pnpm build:golem-js && pnpm build:task-executor && pnpm build:backend && pnpm build:frontend"
"build:all": "pnpm build:loginWithCrypto && pnpm build:ya-ts-client && pnpm build:golem-js && pnpm build:task-executor && pnpm build:backend && pnpm build:frontend",
"start:frontend": "pnpm --filter deposit:frontend start",
"start:backend": "pnpm --filter deposit:backend start",
"start:app": "pnpm start:frontend && pnpm start:backend"
},
"keywords": [],
"author": "",
Expand Down

0 comments on commit 98d27e4

Please sign in to comment.