-
Notifications
You must be signed in to change notification settings - Fork 6
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
Showing
18 changed files
with
324 additions
and
70 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[flake8] | ||
ignore = E501, E265, F811, PT001, DJ05, D100, D105, D104, W504, W292, D106, D107 | ||
ignore = E501, E265, F811, PT001, DJ05, D100, D105, D104, W504, W292, D106, D107, W503 | ||
max-line-length = 79 | ||
exclude = | ||
*/migrations/ |
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
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,29 @@ | ||
[Unit] | ||
|
||
Description=spread_wings_bot | ||
Requires=docker.service | ||
After=docker.service | ||
|
||
[Service] | ||
|
||
Restart=always | ||
RestartSec=5 | ||
TimeOutStartSec=1200 | ||
User=root | ||
|
||
WorkingDirectory=/home/deploy/spread_wings_bot/infra/dev/ | ||
|
||
ExecStartPre=docker-compose -f docker-compose.stage.yaml --env-file /home/deploy/spread_wings_bot/infra/dev/.env pull bot | ||
ExecStartPre=docker-compose -f docker-compose.stage.yaml --env-file /home/deploy/spread_wings_bot/infra/dev/.env pull db | ||
ExecStartPre=docker-compose -f docker-compose.stage.yaml --env-file /home/deploy/spread_wings_bot/infra/dev/.env pull redis | ||
ExecStartPre=docker-compose -f docker-compose.stage.yaml --env-file /home/deploy/spread_wings_bot/infra/dev/.env pull nginx | ||
ExecStartPre=docker-compose -f docker-compose.stage.yaml --env-file /home/deploy/spread_wings_bot/infra/dev/.env down | ||
|
||
# compose up | ||
ExecStart=docker-compose -f docker-compose.stage.yaml --env-file /home/deploy/spread_wings_bot/infra/dev/.env up | ||
|
||
# compose down | ||
ExecStop=docker-compose -f docker-compose.stage.yaml --env-file /home/deploy/spread_wings_bot/infra/dev/.env down | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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,29 @@ | ||
[Unit] | ||
|
||
Description=spread_wings_bot | ||
Requires=docker.service | ||
After=docker.service | ||
|
||
[Service] | ||
|
||
Restart=always | ||
RestartSec=5 | ||
TimeOutStartSec=1200 | ||
User=root | ||
|
||
WorkingDirectory=/home/deploy/spread_wings_bot/infra/prod/ | ||
|
||
ExecStartPre=docker-compose -f docker-compose.prod.yaml --env-file /home/deploy/spread_wings_bot/infra/prod/.env pull bot | ||
ExecStartPre=docker-compose -f docker-compose.prod.yaml --env-file /home/deploy/spread_wings_bot/infra/prod/.env pull db | ||
ExecStartPre=docker-compose -f docker-compose.prod.yaml --env-file /home/deploy/spread_wings_bot/infra/prod/.env pull redis | ||
ExecStartPre=docker-compose -f docker-compose.prod.yaml --env-file /home/deploy/spread_wings_bot/infra/prod/.env pull nginx | ||
ExecStartPre=docker-compose -f docker-compose.prod.yaml --env-file /home/deploy/spread_wings_bot/infra/prod/.env down | ||
|
||
# compose up | ||
ExecStart=docker-compose -f docker-compose.prod.yaml --env-file /home/deploy/spread_wings_bot/infra/prod/.env up | ||
|
||
# compose down | ||
ExecStop=docker-compose -f docker-compose.prod.yaml --env-file /home/deploy/spread_wings_bot/infra/prod/.env down | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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
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
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
49 changes: 49 additions & 0 deletions
49
src/bot/migrations/0008_alter_coordinator_phone_number_and_more.py
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,49 @@ | ||
# Generated by Django 4.2.4 on 2023-09-03 17:19 | ||
|
||
import django.core.validators | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
"""Migrations for bot.""" | ||
|
||
dependencies = [ | ||
("bot", "0007_alter_question_short_description"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="coordinator", | ||
name="phone_number", | ||
field=models.CharField( | ||
blank=True, | ||
help_text="Введите номер телефона регионального координатора", | ||
max_length=20, | ||
null=True, | ||
validators=[ | ||
django.core.validators.RegexValidator( | ||
message="Введите номер телефона в формате: +7 (777) 777-77-77", | ||
regex="^[\\+]?[7, 8][-\\s\\.]?[(]?[0-9]{3}[)]?[-\\s\\.]?[0-9]{3}[-\\s\\.]?[0-9]{2}[-\\s\\.]?[0-9]{2}$", | ||
) | ||
], | ||
verbose_name="Номер телефона", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="coordinator", | ||
name="telegram_account", | ||
field=models.CharField( | ||
blank=True, | ||
help_text="Введите телеграмм-аккаунт регионального координатора", | ||
max_length=32, | ||
null=True, | ||
validators=[ | ||
django.core.validators.RegexValidator( | ||
message="Введите название аккаунта telegram в формате: username", | ||
regex="^[\\w\\_]{5,32}$", | ||
) | ||
], | ||
verbose_name="Telegram", | ||
), | ||
), | ||
] |
Oops, something went wrong.