-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## How does this PR impact the user? - Aibyss is now life on https://aibyss.mfbt.community/ - new version of Aibyss will auto-deploy on every push to main <img width="1608" alt="image" src="https://github.com/user-attachments/assets/0e4dce48-ea22-498b-ab94-505086a22548"> ## Description - [x] add `Dockerfile` - [x] add `docker-compose.yml` - [x] add the deploy GHA workflow ## Limitations N/A ## Checklist - [x] my PR is focused and contains one wholistic change - [x] I have added screenshots or screen recordings to show the changes
- Loading branch information
1 parent
3721ba9
commit 1f19e2c
Showing
5 changed files
with
90 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,34 @@ | ||
.git | ||
|
||
# Nuxt dev/build outputs | ||
.output | ||
.data | ||
.nuxt | ||
.nitro | ||
.cache | ||
dist | ||
|
||
# Node dependencies | ||
node_modules | ||
|
||
# Logs | ||
logs | ||
*.log | ||
|
||
# Misc | ||
.DS_Store | ||
.fleet | ||
.idea | ||
|
||
# Local env files | ||
.env.* | ||
!.env.example | ||
!.env.e2e | ||
|
||
# Database | ||
dev.db | ||
dev.db-journal | ||
|
||
test-results | ||
|
||
.bot-code |
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,26 @@ | ||
name: deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
concurrency: deploy | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup SSH | ||
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.DEPLOY_KEY }} | ||
- name: Deploy | ||
env: | ||
DEPLOY_HOST: '${{ secrets.DEPLOY_HOST }}' | ||
run: | | ||
echo "${DEPLOY_HOST} ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK7gL3O9UrX6EJ/fDVqB5wlh7e25OxdPlWkIHkNtAdf8" >> ~/.ssh/known_hosts | ||
docker context create --docker "host=ssh://root@${DEPLOY_HOST}" --description "deploy server" "mfabt.club" | ||
docker --context "mfabt.club" compose up --build -d |
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 @@ | ||
FROM node:18.20.4 | ||
|
||
WORKDIR /aibyss | ||
|
||
COPY package.json package-lock.json ./ | ||
RUN npm ci | ||
|
||
COPY . . | ||
RUN npm run prisma:generate | ||
RUN npm run build | ||
|
||
CMD ["sh", "-c", "npm run prisma:migrate && npm run start"] |
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,16 @@ | ||
services: | ||
aibyss: | ||
container_name: aibyss | ||
build: . | ||
restart: unless-stopped | ||
ports: | ||
- 127.0.0.1:3005:3000 | ||
environment: | ||
- DATABASE_URL=file:/data/db.sqlite | ||
- BOT_CODE_DIR=/data/bot-codes | ||
volumes: | ||
- data:/data | ||
|
||
volumes: | ||
data: | ||
driver: local |
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