-
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.
- Loading branch information
0 parents
commit cd6d1e3
Showing
24 changed files
with
3,382 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,8 @@ | ||
node_modules | ||
data | ||
dist | ||
|
||
Dockerfile | ||
README.md | ||
|
||
.* |
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,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = 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 @@ | ||
TOKEN= |
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,36 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ghcr.io/${{ github.repository }} | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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 @@ | ||
.env | ||
|
||
node_modules | ||
data | ||
dist | ||
|
||
# IDE - VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json |
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,5 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"printWidth": 120 | ||
} |
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,10 @@ | ||
{ | ||
"recommendations": [ | ||
"streetsidesoftware.code-spell-checker", | ||
"streetsidesoftware.code-spell-checker-ukrainian", | ||
"editorconfig.editorconfig", | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode" | ||
], | ||
"unwantedRecommendations": [] | ||
} |
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 @@ | ||
{ | ||
"version": "0.2.0", | ||
|
||
"configurations": [ | ||
{ | ||
"name": "Launch", | ||
"type": "node", | ||
"request": "launch", | ||
"program": "src/app.ts", | ||
|
||
/* | ||
Path to tsx binary | ||
Assuming locally installed | ||
*/ | ||
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/tsx", | ||
|
||
/* | ||
Open terminal when debugging starts (Optional) | ||
Useful to see console.logs | ||
*/ | ||
"console": "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen", | ||
|
||
// Files to exclude from debugger (e.g. call stack) | ||
"skipFiles": [ | ||
// Node.js internal core modules | ||
"<node_internals>/**", | ||
|
||
// Ignore all dependencies (optional) | ||
"${workspaceFolder}/node_modules/**" | ||
] | ||
} | ||
] | ||
} |
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,22 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"editor.renderWhitespace": "all", | ||
"editor.renderControlCharacters": true, | ||
"explorer.fileNesting.enabled": true, | ||
"explorer.fileNesting.patterns": { | ||
"Dockerfile": ".dockerignore, docker-compose.yaml", | ||
"package.json": ".editorconfig, .env*, .git*, .prettierrc, package-lock.json, tsconfig.json" | ||
}, | ||
"[javascript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[json]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"cSpell.language": "en,uk", | ||
"cSpell.words": ["Xenova"] | ||
} |
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,17 @@ | ||
# build-stage | ||
FROM node:20 as build-stage | ||
ENV NODE_ENV build | ||
WORKDIR /app | ||
COPY package*.json ./ | ||
RUN npm ci | ||
COPY . . | ||
RUN npm run build && npm prune --production | ||
|
||
# production-stage | ||
FROM node:20 | ||
ENV NODE_ENV production | ||
WORKDIR /app | ||
COPY --from=build-stage /app/package*.json ./ | ||
COPY --from=build-stage /app/node_modules/ ./node_modules/ | ||
COPY --from=build-stage /app/dist/ ./dist/ | ||
CMD ["node", "dist/app.js"] |
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 @@ | ||
# Telegram AI Bot |
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,13 @@ | ||
version: '3.8' | ||
|
||
name: ai_bot | ||
|
||
services: | ||
ai_bot: | ||
container_name: ai_bot | ||
image: ghcr.io/operkh/ai_bot | ||
env_file: | ||
- .env | ||
volumes: | ||
- /srv/appdata/ai_bot/data:/app/data | ||
restart: always |
Oops, something went wrong.