-
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.
* Max file size is 500mb * Dockerfiles&compose are tested and updated * Only local telegram api for telegram-bot is supported * Build test added to actions * Less deps for job-manager * Typo fix --------- Co-authored-by: AleX <soaska@cornspace.su>
- Loading branch information
Showing
16 changed files
with
569 additions
and
3,312 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,24 @@ | ||
name: If it builds, it probably works. | ||
|
||
on: | ||
push: | ||
pull_request: | ||
jobs: | ||
build-telegram-bot: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build the telegram-bot Docker image | ||
run: docker build ./telegram-bot -t telegram-bot:$(date +%s) | ||
build-job-manager: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build the job-manager Docker image | ||
run: docker build ./job-manager -t job-manager:$(date +%s) | ||
build-pocketbase: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build the pocketbase Docker image with migrations | ||
run: docker build ./pocketbase -t pocketbase:$(date +%s) |
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 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,34 +1,63 @@ | ||
services: | ||
# own telegram api server | ||
# needed to download / upload large files | ||
# Container link: https://github.com/aiogram/telegram-bot-api | ||
# Info about limitations: https://core.telegram.org/bots/api#using-a-local-bot-api-server | ||
telegram-bot-api: | ||
image: aiogram/telegram-bot-api:latest | ||
hostname: tgapi | ||
environment: | ||
- TELEGRAM_LOCAL=1 | ||
env_file: | ||
- .env | ||
volumes: | ||
- ./data/telegram-bot-api:/var/lib/telegram-bot-api | ||
ports: | ||
- "8081:8081" | ||
- "8082:8082" # statistics | ||
|
||
pocketbase: | ||
hostname: pocketbase | ||
build: | ||
context: ./pocketbase | ||
dockerfile: Dockerfile | ||
restart: unless-stopped | ||
ports: | ||
- 8080:8080 | ||
volumes: | ||
- ./pb_data:/pb/pb_data | ||
- ./data/pocketbase:/pb/pb_data | ||
healthcheck: | ||
test: ["CMD", "curl", "-f", "http://localhost:8080/api/health"] | ||
interval: 30s | ||
timeout: 10s | ||
retries: 5 | ||
|
||
telegram-bot: | ||
job-manager: | ||
build: | ||
context: ./job-manager | ||
dockerfile: Dockerfile | ||
environment: | ||
- DOCKER_BUILD=yas | ||
env_file: | ||
- .env | ||
volumes: | ||
- ./data/telegram-bot-api:/var/lib/telegram-bot-api | ||
restart: unless-stopped | ||
depends_on: | ||
- pocketbase | ||
- telegram-bot-api | ||
|
||
job-manager: | ||
telegram-bot: | ||
build: | ||
context: ./telegram-bot | ||
dockerfile: Dockerfile | ||
environment: | ||
- DOCKER_BUILD=yas | ||
env_file: | ||
- .env | ||
volumes: | ||
- ./data/telegram-bot-api:/var/lib/telegram-bot-api | ||
restart: unless-stopped | ||
depends_on: | ||
- pocketbase | ||
- telegram-bot-api |
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,9 +1,15 @@ | ||
# telegram | ||
TELEGRAM_API = https://api.telegram.org | ||
TELEGRAM_API = "http://tgapi:8081" | ||
TELEGRAM_APITOKEN = 1294890:asdasfdewioru3o2ier | ||
BOT_DEBUG = false | ||
BOT_DEBUG = true | ||
|
||
# for own api server | ||
# get from https://my.telegram.org/apps | ||
TELEGRAM_API_ID=3456789 | ||
TELEGRAM_API_HASH=ydgwgyu779cdddw9c9qwd | ||
TELEGRAM_STAT=1 | ||
|
||
# pocketbase | ||
POCKETBASE_URL = http://0.0.0.0:8080 | ||
POCKETBASE_URL = "http://0.0.0.0:8080" | ||
POCKETBASE_LOGIN = admin@supermario.carts | ||
POCKETBASE_PASSWORD = MAShsRoOm |
Oops, something went wrong.