-
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.
Update deps, use newer GPT3 engines, remove GPT2
- Loading branch information
1 parent
cbee980
commit 78521db
Showing
18 changed files
with
2,188 additions
and
1,657 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,3 +1,5 @@ | ||
BOT_TOKEN= | ||
OPENAI_API_KEY= | ||
BOOSTE_API_KEY= | ||
BOOSTE_API_KEY= | ||
|
||
NODE_ENV=production |
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,68 @@ | ||
name: Build Containers & Deploy | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
SSH_HOST: ${{ secrets.SSH_HOST }} | ||
SSH_USERNAME: ${{ secrets.SSH_USERNAME }} | ||
SSH_KEY: ${{ secrets.SSH_KEY }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
platforms: linux/arm64 | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Pulling new image on server | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ env.SSH_HOST }} | ||
username: ${{ env.SSH_USERNAME }} | ||
key: ${{ env.SSH_KEY }} | ||
script: | | ||
cd /home/ubuntu/docker/larry | ||
sudo docker pull ghcr.io/migushthe2nd/larry:main | ||
sudo docker stack deploy --compose-file docker-compose.yml larry | ||
sudo docker image prune -a -f |
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 @@ | ||
v18 |
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,18 @@ | ||
FROM node:18 AS build-env | ||
|
||
WORKDIR /usr/src/app | ||
|
||
# Environment variables for production | ||
COPY package*.json ./ | ||
COPY pnpm-lock.yaml ./ | ||
RUN corepack enable pnpm | ||
RUN pnpm install | ||
|
||
COPY . . | ||
|
||
RUN pnpm prune --prod | ||
ENV NODE_ENV=production | ||
|
||
# currently just running with src still in the container instead of copying dist to a new container: | ||
# can't get tsc to copy assets (json, images, emails) to dist | ||
CMD pnpm run dev |
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
This file was deleted.
Oops, something went wrong.
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.