-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit for the devbox of terminus
- Loading branch information
0 parents
commit 94bba0e
Showing
227 changed files
with
60,966 additions
and
0 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,49 @@ | ||
name: Build Server | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
push: | ||
branches: | ||
- "main" | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
update_dockerhub: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v3 | ||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASS }} | ||
|
||
- name: Download release check-chart | ||
uses: dsaltares/fetch-gh-release-asset@master | ||
with: | ||
file: check-chart_0.0.1_linux_amd64.tar.gz | ||
repo: beclab/check-chart | ||
target: check-chart.tar.gz | ||
version: tags/v0.0.1 | ||
- name: get latest tag | ||
uses: "WyriHaximus/github-action-get-previous-tag@v1" | ||
id: get-latest-tag | ||
with: | ||
fallback: latest | ||
|
||
- name: unpack check-chart | ||
run: | | ||
tar zxvf check-chart.tar.gz | ||
pwd | ||
ls | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
push: true | ||
tags: beclab/devbox-server:${{ steps.get-latest-tag.outputs.tag }} | ||
file: Dockerfile.server |
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,54 @@ | ||
name: Build frontend | ||
on: | ||
workflow_dispatch: | ||
|
||
push: | ||
branches: | ||
- "main" | ||
tags: | ||
- "v*" | ||
jobs: | ||
build-main: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASS }} | ||
- name: get latest tag | ||
uses: "WyriHaximus/github-action-get-previous-tag@v1" | ||
id: get-latest-tag | ||
with: | ||
fallback: latest | ||
- name: Setup Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "16.18" | ||
- name: Cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/packagge-lock.json')}} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Bootstrap | ||
run: | | ||
npm install | ||
- run: npm i -g @quasar/cli | ||
- run: npm install | ||
- name: Build | ||
run: npm run app:build | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
push: true | ||
tags: beclab/devbox:${{ steps.get-latest-tag.outputs.tag }} | ||
file: Dockerfile |
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,27 @@ | ||
name: Publish to Dockerhub ( GO ) | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tags: | ||
description: 'Release Tags' | ||
|
||
jobs: | ||
update_dockerhub: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASS }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
push: true | ||
tags: beclab/go-dev:${{ github.event.inputs.tags }} | ||
file: containers/Dockerfile.dev.go |
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,27 @@ | ||
name: Publish to Dockerhub ( NodeJS ) | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tags: | ||
description: 'Release Tags' | ||
|
||
jobs: | ||
update_dockerhub: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASS }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
push: true | ||
tags: beclab/node-ts-dev:${{ github.event.inputs.tags }} | ||
file: containers/Dockerfile.dev.node-ts |
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,27 @@ | ||
name: Publish to Dockerhub ( Python ) | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tags: | ||
description: 'Release Tags' | ||
|
||
jobs: | ||
update_dockerhub: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASS }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
push: true | ||
tags: beclab/python-dev:${{ github.event.inputs.tags }} | ||
file: containers/Dockerfile.dev.python |
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,41 @@ | ||
name: Publish to Dockerhub ( server ) | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tags: | ||
description: 'Release Tags' | ||
|
||
jobs: | ||
update_dockerhub: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASS }} | ||
|
||
- name: Download release check-chart | ||
uses: dsaltares/fetch-gh-release-asset@master | ||
with: | ||
file: check-chart_0.0.1_linux_amd64.tar.gz | ||
repo: beclab/check-chart | ||
target: check-chart.tar.gz | ||
version: tags/v0.0.1 | ||
token: ${{ secrets.DOWNLOAD_TOKEN }} | ||
|
||
- name: unpack check-chart | ||
run: | | ||
tar zxvf check-chart.tar.gz | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
push: true | ||
context: . | ||
tags: beclab/devbox-server:${{ github.event.inputs.tags }} | ||
file: Dockerfile.server |
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,46 @@ | ||
name: Publish to Dockerhub ( frontend ) | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tags: | ||
description: 'Release Tags' | ||
|
||
jobs: | ||
update_dockerhub: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASS }} | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '16.18' | ||
- name: Cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/packagge-lock.json')}} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Bootstrap | ||
run: | | ||
npm install | ||
- run: npm i -g @quasar/cli | ||
- run: npm install | ||
- name: Build | ||
run: npm run app:build | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
push: true | ||
tags: beclab/devbox:${{ github.event.inputs.tags }} | ||
file: Dockerfile |
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,48 @@ | ||
# If you prefer the allow list template instead of the deny list, see community template: | ||
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore | ||
# | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
.idea | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
|
||
# Go workspace file | ||
go.work | ||
tmp | ||
devbox | ||
|
||
.DS_Store | ||
.thumbs.db | ||
node_modules | ||
output | ||
|
||
.history | ||
packages/**/server/web-box | ||
packages/**/db/ | ||
packages/**/cmd | ||
.env | ||
node_modules | ||
packages/**/dist/ | ||
.quasar | ||
.lintcache | ||
.eslintcache | ||
packages/**/data/ | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
web/.vscode | ||
packages/web/pkg/sumdb/sum.golang.org |
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 @@ | ||
save-exact=true |
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 @@ | ||
v16.13.1 |
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,8 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"vue.vscode-typescript-vue-plugin", | ||
"vue.volar" | ||
] | ||
} |
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,12 @@ | ||
{ | ||
"editor.bracketPairColorization.enabled": true, | ||
"editor.guides.bracketPairs": true, | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.codeActionsOnSave": ["source.fixAll.eslint"], | ||
"eslint.validate": ["javascript", "javascriptreact", "typescript", "vue"], | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"[vue]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
} | ||
} |
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,35 @@ | ||
FROM nginx:stable-alpine | ||
|
||
COPY packages/web/dist/spa /app | ||
|
||
RUN apk --no-cache add nginx | ||
|
||
RUN echo ' \ | ||
server { \ | ||
listen 80 default_server; \ | ||
root /app; \ | ||
\ | ||
location / { \ | ||
add_header Cache-Control "no-store"; \ | ||
try_files $uri $uri/index.html /index.html; \ | ||
} \ | ||
\ | ||
location /api/ { \ | ||
proxy_pass http://devbox-server:8080; \ | ||
proxy_set_header Host $http_host; \ | ||
proxy_set_header X-real-ip $remote_addr; \ | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; \ | ||
proxy_http_version 1.1; \ | ||
proxy_set_header Upgrade $http_upgrade; \ | ||
proxy_set_header Connection $http_connection; \ | ||
proxy_set_header Accept-Encoding gzip; \ | ||
proxy_read_timeout 180; \ | ||
} \ | ||
\ | ||
}' > /etc/nginx/conf.d/default.conf | ||
|
||
RUN ln -sf /dev/stdout /var/log/nginx/access.log && ln -sf /dev/stderr /var/log/nginx/error.log | ||
|
||
EXPOSE 80 | ||
|
||
CMD [ "nginx", "-g", "daemon off;" ] |
Oops, something went wrong.