merged master
This commit is contained in:
commit
68029b8acd
@ -5,8 +5,6 @@ stages:
|
|||||||
|
|
||||||
variables:
|
variables:
|
||||||
SOLUTIONS_ROOT_EXTERNAL: "/sprint-data/data/solutions"
|
SOLUTIONS_ROOT_EXTERNAL: "/sprint-data/data/solutions"
|
||||||
DB_HOST: "postgres"
|
|
||||||
RABBIT_HOST: "rabbitmq"
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
@ -36,9 +34,7 @@ deploy-dev:
|
|||||||
variables:
|
variables:
|
||||||
PORT: 80
|
PORT: 80
|
||||||
SOLUTIONS_ROOT_EXTERNAL: "/sprint-data/data/solutions"
|
SOLUTIONS_ROOT_EXTERNAL: "/sprint-data/data/solutions"
|
||||||
DB_HOST: "postgres"
|
HOST: "77.246.159.65"
|
||||||
RABBIT_HOST: "rabbitmq"
|
|
||||||
FS_HOST: "http://storage"
|
|
||||||
|
|
||||||
deploy-prod:
|
deploy-prod:
|
||||||
extends:
|
extends:
|
||||||
|
@ -21,7 +21,7 @@ class UserInfo(models.Model):
|
|||||||
notification_solution_result = models.BooleanField(default=False)
|
notification_solution_result = models.BooleanField(default=False)
|
||||||
|
|
||||||
def _append_task(self, task, tasks):
|
def _append_task(self, task, tasks):
|
||||||
if task.creator == self.user or task.public:
|
if task.creator == self.user or task.public or self.user.is_superuser:
|
||||||
tasks.append(task)
|
tasks.append(task)
|
||||||
return
|
return
|
||||||
for st in SetTask.objects.filter(task=task):
|
for st in SetTask.objects.filter(task=task):
|
||||||
|
@ -16,6 +16,9 @@ import os
|
|||||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
|
||||||
|
|
||||||
|
HOST = os.getenv("HOST", "0.0.0.0")
|
||||||
|
|
||||||
# Quick-start development settings - unsuitable for production
|
# Quick-start development settings - unsuitable for production
|
||||||
# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
|
# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
|
||||||
|
|
||||||
@ -83,7 +86,7 @@ DATABASES = {
|
|||||||
"NAME": "sprint",
|
"NAME": "sprint",
|
||||||
"USER": "postgres",
|
"USER": "postgres",
|
||||||
"PASSWORD": os.getenv("DB_PASSWORD", "password"),
|
"PASSWORD": os.getenv("DB_PASSWORD", "password"),
|
||||||
"HOST": os.getenv("DB_HOST", "0.0.0.0"),
|
"HOST": HOST,
|
||||||
"PORT": 5432,
|
"PORT": 5432,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -140,7 +143,7 @@ for root in DATA_ROOT, EXTRA_FILES_ROOT, MEDIA_ROOT:
|
|||||||
|
|
||||||
SOLUTIONS_ROOT = os.path.join(DATA_ROOT, "solutions")
|
SOLUTIONS_ROOT = os.path.join(DATA_ROOT, "solutions")
|
||||||
|
|
||||||
RABBIT_HOST = os.getenv("RABBIT_HOST", "0.0.0.0")
|
RABBIT_HOST = HOST
|
||||||
RABBIT_PORT = 5672
|
RABBIT_PORT = 5672
|
||||||
|
|
||||||
FS_HOST = os.getenv("FS_HOST", "http://0.0.0.0")
|
FS_HOST = os.getenv("FS_HOST", "http://0.0.0.0")
|
||||||
|
@ -22,9 +22,13 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
PORT: $PORT
|
PORT: $PORT
|
||||||
|
<<<<<<< HEAD
|
||||||
DB_HOST: $DB_HOST
|
DB_HOST: $DB_HOST
|
||||||
RABBIT_HOST: $RABBIT_HOST
|
RABBIT_HOST: $RABBIT_HOST
|
||||||
FS_HOST: $FS_HOST
|
FS_HOST: $FS_HOST
|
||||||
|
=======
|
||||||
|
HOST: $HOST
|
||||||
|
>>>>>>> a512261c4d4b443cf25874181acd50485f1b40a4
|
||||||
command: scripts/runserver.sh
|
command: scripts/runserver.sh
|
||||||
ports:
|
ports:
|
||||||
- "${PORT}:${PORT}"
|
- "${PORT}:${PORT}"
|
||||||
@ -47,6 +51,8 @@ services:
|
|||||||
bot:
|
bot:
|
||||||
image: mathwave/sprint-repo:sprint
|
image: mathwave/sprint-repo:sprint
|
||||||
restart: always
|
restart: always
|
||||||
|
environment:
|
||||||
|
HOST: $HOST
|
||||||
command: python manage.py bot
|
command: python manage.py bot
|
||||||
depends_on:
|
depends_on:
|
||||||
- web
|
- web
|
||||||
@ -67,9 +73,7 @@ services:
|
|||||||
command: scripts/create_worker.sh
|
command: scripts/create_worker.sh
|
||||||
environment:
|
environment:
|
||||||
SOLUTIONS_ROOT_EXTERNAL: "${SOLUTIONS_ROOT_EXTERNAL}"
|
SOLUTIONS_ROOT_EXTERNAL: "${SOLUTIONS_ROOT_EXTERNAL}"
|
||||||
DB_HOST: "${DB_HOST}"
|
HOST: $HOST
|
||||||
RABBIT_HOST: "${RABBIT_HOST}"
|
|
||||||
FS_HOST: "${FS_HOST}"
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- web
|
- web
|
||||||
- rabbitmq
|
- rabbitmq
|
||||||
|
@ -24,6 +24,9 @@
|
|||||||
<h3>
|
<h3>
|
||||||
{{ account.userinfo.surname }} {{ account.userinfo.name }} {{ account.userinfo.middle_name }}
|
{{ account.userinfo.surname }} {{ account.userinfo.name }} {{ account.userinfo.middle_name }}
|
||||||
<span style="margin-left: 15px;" class="badge badge-{% if account.userinfo.activity_status == online_status %}success{% else %}secondary{% endif %}">{{ account.userinfo.activity_status }}</span>
|
<span style="margin-left: 15px;" class="badge badge-{% if account.userinfo.activity_status == online_status %}success{% else %}secondary{% endif %}">{{ account.userinfo.activity_status }}</span>
|
||||||
|
{% if user.is_superuser %}
|
||||||
|
<a style="margin-left: 15px;" href="/admin/" class="badge badge-secondary"> Админ</a>
|
||||||
|
{% endif %}
|
||||||
</h3>
|
</h3>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
{% extends 'base_main.html' %}
|
{% extends 'base_main.html' %}
|
||||||
|
|
||||||
|
{% block title %}сеты{% endblock %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
@ -44,4 +46,4 @@
|
|||||||
{% for set in user.userinfo.available_sets %}
|
{% for set in user.userinfo.available_sets %}
|
||||||
<a href="/set?set_id={{ set.id }}">{{ set.name }}</a> {% if set.creator == user %}<a href="/admin/set?set_id={{ set.id }}"><i class="fa fa-pencil"></i> </a>{% endif %}<br>
|
<a href="/set?set_id={{ set.id }}">{{ set.name }}</a> {% if set.creator == user %}<a href="/admin/set?set_id={{ set.id }}"><i class="fa fa-pencil"></i> </a>{% endif %}<br>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
Reference in New Issue
Block a user