-
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.
Moving server to bun to fix instability issues
- Loading branch information
1 parent
9a054cc
commit f3f42de
Showing
9 changed files
with
253 additions
and
239 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 |
---|---|---|
@@ -1,50 +1,63 @@ | ||
name: Build and Push Docker Image | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
push: | ||
branches: [main] | ||
env: | ||
TAG: latest | ||
TAG: latest | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
push: true | ||
tags: ghcr.io/${{ github.repository }}:${{ env.TAG }} | ||
|
||
- name: deploy-dev | ||
uses: th0th/[email protected] | ||
env: | ||
RANCHER_BEARER_TOKEN: ${{ secrets.RANCHER_BEARER_TOKEN }} | ||
RANCHER_URL: 'https://rancher.mun.sh' | ||
RANCHER_CLUSTER_ID: 'local' | ||
RANCHER_PROJECT_ID: 'p-vdwsg' | ||
RANCHER_NAMESPACE: 'default' | ||
RANCHER_WORKLOADS: 'rgb' | ||
|
||
- name: deploy-dev | ||
uses: th0th/[email protected] | ||
env: | ||
RANCHER_BEARER_TOKEN: ${{ secrets.RANCHER_BEARER_TOKEN }} | ||
RANCHER_URL: 'https://rancher.mun.sh' | ||
RANCHER_CLUSTER_ID: 'local' | ||
RANCHER_PROJECT_ID: 'p-vdwsg' | ||
RANCHER_NAMESPACE: 'default' | ||
RANCHER_WORKLOADS: 'rgb-browser' | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: oven-sh/setup-bun@v1 | ||
with: | ||
bun-version: latest | ||
|
||
- name: Install deps | ||
run: bun install | ||
|
||
- name: Build | ||
run: bun run build | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
push: true | ||
tags: ghcr.io/${{ github.repository }}:${{ env.TAG }} | ||
|
||
- name: deploy-dev | ||
uses: th0th/[email protected] | ||
env: | ||
RANCHER_BEARER_TOKEN: ${{ secrets.RANCHER_BEARER_TOKEN }} | ||
RANCHER_URL: 'https://rancher.mun.sh' | ||
RANCHER_CLUSTER_ID: 'local' | ||
RANCHER_PROJECT_ID: 'p-vdwsg' | ||
RANCHER_NAMESPACE: 'default' | ||
RANCHER_WORKLOADS: 'rgb' | ||
|
||
- name: deploy-dev | ||
uses: th0th/[email protected] | ||
env: | ||
RANCHER_BEARER_TOKEN: ${{ secrets.RANCHER_BEARER_TOKEN }} | ||
RANCHER_URL: 'https://rancher.mun.sh' | ||
RANCHER_CLUSTER_ID: 'local' | ||
RANCHER_PROJECT_ID: 'p-vdwsg' | ||
RANCHER_NAMESPACE: 'default' | ||
RANCHER_WORKLOADS: 'rgb-browser' |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
node_modules/ | ||
.env | ||
.env | ||
dist/ |
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 |
---|---|---|
@@ -1,8 +1,7 @@ | ||
FROM node:16 | ||
FROM oven/bun | ||
|
||
COPY . /app | ||
WORKDIR /app | ||
|
||
RUN yarn | ||
|
||
CMD [ "yarn", "start" ] | ||
EXPOSE 3000 | ||
CMD [ "bun", "src/server.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
Oops, something went wrong.