bot token
This commit is contained in:
parent
72260dc90f
commit
ce8b989f24
@ -35,6 +35,7 @@ deploy-dev:
|
|||||||
PORT: 80
|
PORT: 80
|
||||||
SOLUTIONS_ROOT_EXTERNAL: "/sprint-data/data/solutions"
|
SOLUTIONS_ROOT_EXTERNAL: "/sprint-data/data/solutions"
|
||||||
HOST: "77.246.159.65"
|
HOST: "77.246.159.65"
|
||||||
|
BOT_TOKEN: $BOT_TOKEN
|
||||||
|
|
||||||
deploy-prod:
|
deploy-prod:
|
||||||
extends:
|
extends:
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
import telebot
|
import telebot
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.core.management.base import BaseCommand
|
from django.core.management.base import BaseCommand
|
||||||
@ -5,7 +7,7 @@ from telebot.types import Message
|
|||||||
|
|
||||||
from Main.models import UserInfo
|
from Main.models import UserInfo
|
||||||
|
|
||||||
bot = telebot.TeleBot("1994460106:AAGrGsCZjF6DVG_T-zycELuVfxnWw8x7UyU")
|
bot = telebot.TeleBot(os.getenv("BOT_TOKEN"))
|
||||||
|
|
||||||
|
|
||||||
@bot.message_handler(commands=["start"])
|
@bot.message_handler(commands=["start"])
|
||||||
|
@ -1,17 +1,27 @@
|
|||||||
version: "3"
|
version: "3.4"
|
||||||
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
postgres:
|
.variables:
|
||||||
restart: always
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: dockerfiles/postgres/Dockerfile
|
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
|
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
|
||||||
POSTGRES_DB: sprint
|
POSTGRES_DB: sprint
|
||||||
|
PORT: $PORT
|
||||||
|
HOST: $HOST
|
||||||
|
BOT_TOKEN: $BOT_TOKEN
|
||||||
|
SOLUTIONS_ROOT_EXTERNAL: "${SOLUTIONS_ROOT_EXTERNAL}"
|
||||||
|
|
||||||
|
postgres:
|
||||||
|
restart: always
|
||||||
|
extends:
|
||||||
|
service: .variables
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: dockerfiles/postgres/Dockerfile
|
||||||
|
environment:
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- /sprint-data/postgres-data:/var/lib/postgresql/data
|
- /sprint-data/postgres-data:/var/lib/postgresql/data
|
||||||
ports:
|
ports:
|
||||||
@ -20,9 +30,8 @@ services:
|
|||||||
web:
|
web:
|
||||||
image: mathwave/sprint-repo:sprint
|
image: mathwave/sprint-repo:sprint
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
extends:
|
||||||
PORT: $PORT
|
service: .variables
|
||||||
HOST: $HOST
|
|
||||||
command: scripts/runserver.sh
|
command: scripts/runserver.sh
|
||||||
ports:
|
ports:
|
||||||
- "${PORT}:${PORT}"
|
- "${PORT}:${PORT}"
|
||||||
@ -35,6 +44,8 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
image: mathwave/sprint-repo:sprint
|
image: mathwave/sprint-repo:sprint
|
||||||
command: python manage.py storage
|
command: python manage.py storage
|
||||||
|
extends:
|
||||||
|
service: .variables
|
||||||
ports:
|
ports:
|
||||||
- "5555:5555"
|
- "5555:5555"
|
||||||
volumes:
|
volumes:
|
||||||
@ -43,14 +54,16 @@ services:
|
|||||||
bot:
|
bot:
|
||||||
image: mathwave/sprint-repo:sprint
|
image: mathwave/sprint-repo:sprint
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
extends:
|
||||||
HOST: $HOST
|
service: .variables
|
||||||
command: python manage.py bot
|
command: python manage.py bot
|
||||||
depends_on:
|
depends_on:
|
||||||
- web
|
- web
|
||||||
|
|
||||||
rabbitmq:
|
rabbitmq:
|
||||||
restart: always
|
restart: always
|
||||||
|
extends:
|
||||||
|
service: .variables
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: dockerfiles/rabbitmq/Dockerfile
|
dockerfile: dockerfiles/rabbitmq/Dockerfile
|
||||||
@ -63,9 +76,8 @@ services:
|
|||||||
image: mathwave/sprint-repo:sprint
|
image: mathwave/sprint-repo:sprint
|
||||||
privileged: true
|
privileged: true
|
||||||
command: python manage.py receive
|
command: python manage.py receive
|
||||||
environment:
|
extends:
|
||||||
SOLUTIONS_ROOT_EXTERNAL: "${SOLUTIONS_ROOT_EXTERNAL}"
|
service: .variables
|
||||||
HOST: $HOST
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- web
|
- web
|
||||||
- rabbitmq
|
- rabbitmq
|
||||||
|
Loading…
Reference in New Issue
Block a user