Revert "bot token"

This reverts commit ce8b989f24.
This commit is contained in:
Egor Matveev 2021-11-23 14:21:35 +03:00
parent ce8b989f24
commit 07a04af473
3 changed files with 13 additions and 28 deletions

View File

@ -35,7 +35,6 @@ 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:

View File

@ -1,5 +1,3 @@
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
@ -7,7 +5,7 @@ from telebot.types import Message
from Main.models import UserInfo from Main.models import UserInfo
bot = telebot.TeleBot(os.getenv("BOT_TOKEN")) bot = telebot.TeleBot("1994460106:AAGrGsCZjF6DVG_T-zycELuVfxnWw8x7UyU")
@bot.message_handler(commands=["start"]) @bot.message_handler(commands=["start"])

View File

@ -1,27 +1,17 @@
version: "3.4" version: "3"
services: services:
.variables:
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
POSTGRES_DB: sprint
PORT: $PORT
HOST: $HOST
BOT_TOKEN: $BOT_TOKEN
SOLUTIONS_ROOT_EXTERNAL: "${SOLUTIONS_ROOT_EXTERNAL}"
postgres: postgres:
restart: always restart: always
extends:
service: .variables
build: build:
context: . context: .
dockerfile: dockerfiles/postgres/Dockerfile dockerfile: dockerfiles/postgres/Dockerfile
environment: environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
POSTGRES_DB: sprint
volumes: volumes:
- /sprint-data/postgres-data:/var/lib/postgresql/data - /sprint-data/postgres-data:/var/lib/postgresql/data
ports: ports:
@ -30,8 +20,9 @@ services:
web: web:
image: mathwave/sprint-repo:sprint image: mathwave/sprint-repo:sprint
restart: always restart: always
extends: environment:
service: .variables PORT: $PORT
HOST: $HOST
command: scripts/runserver.sh command: scripts/runserver.sh
ports: ports:
- "${PORT}:${PORT}" - "${PORT}:${PORT}"
@ -44,8 +35,6 @@ 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:
@ -54,16 +43,14 @@ services:
bot: bot:
image: mathwave/sprint-repo:sprint image: mathwave/sprint-repo:sprint
restart: always restart: always
extends: environment:
service: .variables HOST: $HOST
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
@ -76,8 +63,9 @@ 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
extends: environment:
service: .variables SOLUTIONS_ROOT_EXTERNAL: "${SOLUTIONS_ROOT_EXTERNAL}"
HOST: $HOST
depends_on: depends_on:
- web - web
- rabbitmq - rabbitmq