-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from OktopUSP/dev
CircleCI main services build and deploy + index page title
- Loading branch information
Showing
5 changed files
with
67 additions
and
345 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
version: 2.1 | ||
executors: | ||
nodejs: | ||
docker: | ||
- image: cimg/node:18.17.1 | ||
golang: | ||
docker: | ||
- image: cimg/go:1.20.7 | ||
|
||
jobs: | ||
|
||
build_and_deploy_controller: | ||
executor: golang | ||
steps: | ||
- checkout | ||
- run: | ||
name: Build and Deploy Controller | ||
command: | | ||
cd backend/services/controller && go build -o controller cmd/oktopus/main.go | ||
scp -o StrictHostKeyChecking=no controller $SSH_USER@$SSH_HOST:/home/$SSH_USER | ||
ssh -o StrictHostKeyChecking=no $SSH_USER@$SSH_HOST "sudo mv controller /usr/bin/ && sudo systemctl restart controller" | ||
build_and_deploy_mochi: | ||
executor: golang | ||
steps: | ||
- checkout | ||
- run: | ||
name: Build and Deploy Mochi | ||
command: | | ||
cd backend/services/mochi/ && go build -o mochi cmd/main.go | ||
scp -o StrictHostKeyChecking=no mochi $SSH_USER@$SSH_HOST:/home/$SSH_USER | ||
ssh -o StrictHostKeyChecking=no $SSH_USER@$SSH_HOST "sudo mv mochi /usr/bin/ && sudo systemctl restart mochi" | ||
build_and_deploy_frontend: | ||
executor: nodejs | ||
steps: | ||
- checkout | ||
- run: | ||
name: Build and Deploy Frontend | ||
command: | | ||
cd frontend && npm i && npm run build | ||
scp -o StrictHostKeyChecking=no -r .next/ $SSH_USER@$SSH_HOST:/home/$SSH_USER/oktopus/frontend | ||
ssh -o StrictHostKeyChecking=no $SSH_USER@$SSH_HOST "pm2 restart oktopus" | ||
workflows: | ||
build_and_deploy: | ||
jobs: | ||
- build_and_deploy_controller: | ||
filters: | ||
branches: | ||
only: main | ||
- build_and_deploy_mochi: | ||
filters: | ||
branches: | ||
only: main | ||
- build_and_deploy_frontend: | ||
filters: | ||
branches: | ||
only: main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,8 @@ go.work | |
*.txt | ||
*.pwd | ||
*.acl | ||
.idea | ||
.idea | ||
.vscode | ||
controller | ||
main | ||
mochi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.