Skip to content

Commit

Permalink
prune: remove a lot of junk
Browse files Browse the repository at this point in the history
  • Loading branch information
eesoymilk committed May 19, 2024
1 parent 5c65838 commit 6c56cdf
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 661 deletions.
Binary file removed .DS_Store
Binary file not shown.
50 changes: 18 additions & 32 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,15 @@ on:
paths:
- ".github/workflows/**.yml"
- "Dockerfile"
- "docker-compose.yml"
- "**.py"
- "requirements.txt"

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
# CONTAINER_NAME: soybot-container

KAMATERA_USER: soymilk
KAMATERA_PORT: 22
KAMATERA_PATH: ~/app/soybot

POSTGRES_PORT: 5432
POSTGRES_USER: postgres
POSTGRES_DB: soybot
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}

GCPLOGS_AUTH_PATH: /root/.config/gcplogs/auth.json
GCP_PROJECT: eesoybot

Expand Down Expand Up @@ -59,15 +50,15 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Copy docker-compose.yml to Kamatera
run: |
echo "${{ secrets.KAMATERA_KEY }}" > private_key.pem
chmod 600 private_key.pem
scp -o StrictHostKeyChecking=no \
-i private_key.pem \
-P ${{ env.KAMATERA_PORT }} \
./docker-compose.yml \
${{ env.KAMATERA_USER }}@${{ secrets.KAMATERA_HOST }}:${{ env.KAMATERA_PATH }}
# - name: Copy docker-compose.yml to Kamatera
# run: |
# echo "${{ secrets.KAMATERA_KEY }}" > private_key.pem
# chmod 600 private_key.pem
# scp -o StrictHostKeyChecking=no \
# -i private_key.pem \
# -P ${{ env.KAMATERA_PORT }} \
# ./docker-compose.yml \
# ${{ env.KAMATERA_USER }}@${{ secrets.KAMATERA_HOST }}:${{ env.KAMATERA_PATH }}

deploy:
needs: build-and-push
Expand All @@ -80,17 +71,12 @@ jobs:
username: soymilk
key: ${{ secrets.KAMATERA_KEY }}
script: |
cd ${{ env.KAMATERA_PATH }}
export TOKEN=${{ secrets.TOKEN }}
export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
export GCP_PROJECT=${{ env.GCP_PROJECT }}
export POSTGRES_PORT=${{ env.POSTGRES_PORT }}
export POSTGRES_USER=${{ env.POSTGRES_USER }}
export POSTGRES_DB=${{ env.POSTGRES_DB }}
export POSTGRES_PASSWORD=${{ env.POSTGRES_PASSWORD }}
docker compose down
docker system prune -f
docker compose pull
docker compose up -d
docker stop soybot || true
docker run -d \
--name soybot \
-e TOKEN=${ secrets.TOKEN } \
-e OPENAI_API_KEY=${ secrets.OPENAI_API_KEY } \
-e GCP_PROJECT=${ secrets.GCP_PROJECT } \
--log-driver=gcplogs \
--log-opt gcp-project=${ env.GCP_PROJECT } \
ghcr.io/soymilk/soybot:latest
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.DS_Store

*.ipynb

# logs
Expand Down
110 changes: 0 additions & 110 deletions alembic.ini

This file was deleted.

1 change: 0 additions & 1 deletion alembic/README

This file was deleted.

78 changes: 0 additions & 78 deletions alembic/env.py

This file was deleted.

24 changes: 0 additions & 24 deletions alembic/script.py.mako

This file was deleted.

1 change: 0 additions & 1 deletion commands/__init__.py

This file was deleted.

31 changes: 0 additions & 31 deletions commands/starburst.py

This file was deleted.

42 changes: 0 additions & 42 deletions docker-compose.yml

This file was deleted.

Loading

0 comments on commit 6c56cdf

Please sign in to comment.