Skip to content

Commit

Permalink
resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
KonstantinRaikhert committed Oct 7, 2024
2 parents 851f7ab + a26618b commit b846efc
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 66 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/prod_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- master

env:
DEPLOY_PATH: adaptive_hockey_federation
REGISTRY: ghcr.io
Expand Down Expand Up @@ -87,6 +86,22 @@ jobs:
rm -r infra/stage
rm -r infra/dev
- name: Stopping old containers
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
passphrase: ${{ secrets.SSH_PASSPHRASE }}
script: |
STATUS="$(systemctl is-active adaptive_hockey_federation.service)"
if [ "${STATUS}" = "active" ]; then
sudo systemctl stop adaptive_hockey_federation.service
echo "Stopping old containers"
else
echo "No active containers"
fi
- name: Copy infra via ssh
uses: appleboy/scp-action@master
with:
Expand All @@ -98,7 +113,6 @@ jobs:
target: "${{ env.DEPLOY_PATH }}/infra"
rm: true
strip_components: 1

- name: Execute commands on VPS
uses: appleboy/ssh-action@master
with:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,5 @@ media/
# DS server
a_hockey-main/
adaptive_hockey_federation/service/test_video/

db_dump.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.core.management import call_command
from django.core.management.base import BaseCommand

from adaptive_hockey_federation.core.config.dev_settings import DB_DUMP_FILE
from core.config.dev_settings import DB_DUMP_FILE


class Command(BaseCommand):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from django.db import connection, transaction
from main.models import Diagnosis

from adaptive_hockey_federation.core.config.dev_settings import (
from core.config.dev_settings import (
FILE_MODEL_MAP,
FIXSTURES_DIR,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from django.core.management.base import BaseCommand
from django.db import connection

from adaptive_hockey_federation.core.config.dev_settings import DB_DUMP_FILE
from core.config.dev_settings import DB_DUMP_FILE


class Command(BaseCommand):
Expand Down
117 changes: 56 additions & 61 deletions adaptive_hockey_federation/templates/base/drawer.html
Original file line number Diff line number Diff line change
@@ -1,61 +1,56 @@
{% if not request.user.is_moderator %}
<aside id="container__fluid" class="aside-navbar">
<div class="navbar-container">
<ul class="navigate">
<div class="py-5 logo-zone">
<div class="col-auto flex justify-end">
<span class="logo-img">
<img src="https://paraicehockey.ru/wp-content/uploads/2022/02/FAH_q.png" width="100" height="100">
</span>
</div>
<div class="col text-white flex justify-start">
Мир хоккея<br>для особенных<br>детей
</div>
</div>
{% if not request.user.is_agent %}
<li class="nav-item py-2 list-group">
{% url 'main:players' as url_name %}{% include "base/button.html" with name="Игроки" %}
</li>
<li class="nav-item py-2">
{% url 'users:users' as url_name %}{% include "base/button.html" with name="Пользователи" %}
</li>
{% endif %}
<li class="nav-item py-2">
{% url 'main:teams' as url_name %}{% include "base/button.html" with name="Команды" %}
</li>
{% if not request.user.is_agent %}
<li class="nav-item py-2">
{% url 'main:staffs' as url_name %}{% include "base/button.html" with name="Персонал команд" %}
</li>
{% endif %}
<li class="nav-item py-2">
{% url 'competitions:competitions' as url_name %}{% include "base/button.html" with name="Соревнования" %}
</li>
{% if not request.user.is_agent %}
<li class="nav-item py-2">
{% url 'analytics:analytics' as url_name %}{% include "base/button.html" with name="Аналитика" %}
</li>
{% endif %}
{% if request.user.is_admin %}
<li class="nav-item py-2">
{% url 'unloads:unloads' as url_name %}{% include "base/button.html" with name="Выгрузки" %}
</li>
{% endif %}
{% if not request.user.is_agent %}
<li class="nav-item py-2">
{% url 'games:games' as url_name %}{% include "base/button.html" with name="Игры" %}
</li>
{% endif %}
</ul>
<button
onclick="toggle_visibility(false);"
class="nav-button"
type="button"
aria-controls="staticBackdrop"
aria-expanded="true"
>
{% include "base/triangle.html" %}
</button>
</div>
</aside>
{% endif %}
{% if not request.user.is_moderator %}
<aside id="container__fluid" class="aside-navbar">
<div class="navbar-container">
<ul class="navigate">
<div class="py-5 logo-zone">
<div class="col-auto flex justify-end">
<span class="logo-img">
<img src="https://paraicehockey.ru/wp-content/uploads/2022/02/FAH_q.png" width="100" height="100">
</span>
</div>
<div class="col text-white flex justify-start">
Мир хоккея<br>для особенных<br>детей
</div>
</div>
{% if not request.user.is_agent %}
<li class="nav-item py-2 list-group">
{% url 'main:players' as url_name %}{% include "base/button.html" with name="Игроки" %}
</li>
<li class="nav-item py-2">
{% url 'users:users' as url_name %}{% include "base/button.html" with name="Пользователи" %}
</li>
{% endif %}
<li class="nav-item py-2">
{% url 'main:teams' as url_name %}{% include "base/button.html" with name="Команды" %}
</li>
{% if not request.user.is_agent %}
<li class="nav-item py-2">
{% url 'main:staffs' as url_name %}{% include "base/button.html" with name="Персонал команд" %}
</li>
{% endif %}
<li class="nav-item py-2">
{% url 'competitions:competitions' as url_name %}{% include "base/button.html" with name="Соревнования" %}
</li>
{% if not request.user.is_agent %}
<li class="nav-item py-2">
{% url 'analytics:analytics' as url_name %}{% include "base/button.html" with name="Аналитика" %}
</li>
{% endif %}
{% if request.user.is_admin %}
<li class="nav-item py-2">
{% url 'unloads:unloads' as url_name %}{% include "base/button.html" with name="Выгрузки" %}
</li>
{% endif %}
</ul>
<button
onclick="toggle_visibility(false);"
class="nav-button"
type="button"
aria-controls="staticBackdrop"
aria-expanded="true"
>
{% include "base/triangle.html" %}
</button>
</div>
</aside>
{% endif %}
1 change: 1 addition & 0 deletions infra/prod/docker-compose.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ services:
volumes:
- static_value:/app/adaptive_hockey_federation/static/
- ../../media:/app/adaptive_hockey_federation/media/
- ../../fixtures:/app/adaptive_hockey_federation/core/fixtures/
env_file:
- ../../.env
depends_on:
Expand Down

0 comments on commit b846efc

Please sign in to comment.