This commit is contained in:
Sergey 2021-02-23 20:48:11 +03:00
parent 956550cfc9
commit a3b57c3694
6 changed files with 70 additions and 8 deletions

24
.dockerignore Normal file
View File

@ -0,0 +1,24 @@
# Project
.idea/
.github/
pyproject.toml
.flake8
.*ignore
.isort.cfg
Makefile
readme.md
# Cache
*.py[cod]
__pycache__
# Texts
*.mo
# Environment
*.env
env_file
# Docker
docker-compose*.yml
Dockerfile

25
.github/workflow/dockerimage.yml vendored Normal file
View File

@ -0,0 +1,25 @@
name: Build Docker Image
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build and publish
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: Kylmakalle/tgvkbot:latest
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
snapshot: true
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: peterevans/dockerhub-description

View File

@ -32,3 +32,9 @@ AUDIO_API_VERSION = os.environ.get('API_VERSION', '5.78')
# Возможно достаточно заглушки в стиле 'tgvkbot-super-secret-key(nope)'
SECRET_KEY = os.environ.get('SECRET_KEY', '!jh4wm=%s%l&jv7-lru6hg)mq2pk&rd@i*s0*c!v!zv01cf9iw')
SENTRY_URL = os.environ.get('SENTRY_URL', None)
if SENTRY_URL:
import sentry_sdk
sentry_sdk.init(SENTRY_URL)

View File

@ -1,21 +1,27 @@
version: '2'
version: '3'
services:
app:
build: .
logging:
options:
max-size: "10M"
max-file: "10"
image: kylmakalle/tgvkbot:latest
restart: always
environment:
BOT_TOKEN:
env_file:
- env_file
labels:
com.centurylinklabs.watchtower.enable: 'true'
depends_on:
- db
db:
image: postgres:9-alpine
volumes:
- db:/var/lib/postgresql/data
- "dbdata:/var/lib/postgresql/data"
restart: always
environment:
POSTGRES_DB: 'tgvkbot'
POSTGRES_PASSWORD: 'postgres'
volumes:
db:
driver: local
dbdata:

1
readme.md Normal file
View File

@ -0,0 +1 @@
# tgvkbot

View File

@ -8,7 +8,7 @@ multidict==4.1.0
Pillow==5.1.0
psycopg2-binary==2.7.4
pytz==2018.3
sentry-sdk==0.9.0
sentry-sdk==0.20.3
ujson==1.35
urllib3==1.25.3
wget==3.2