This commit is contained in:
Administrator 2022-08-21 12:18:00 +03:00
parent c41d11b039
commit 644b3c0bc8
3 changed files with 2 additions and 37 deletions

View File

@ -41,30 +41,6 @@ services:
restart_policy:
condition: on-failure
collect_static:
image: mathwave/sprint-repo:sprint
command: ./manage.py collectstatic --noinput
networks:
- net
environment:
DB_HOST: "pg.develop.sprinthub.ru"
FS_HOST: "storage"
RABBIT_HOST: "rabbitmq.develop.sprinthub.ru"
REDIS_HOST: "redis.develop.sprinthub.ru"
RABBIT_PASSWORD: $RABBITMQ_PASSWORD_DEV
REDIS_PASSWORD: $REDIS_PASSWORD_DEV
DB_PASSWORD: $DB_PASSWORD_DEV
DEBUG: "true"
TELEGRAM_TOKEN: $TELEGRAM_TOKEN_DEV
volumes:
- /sprint-data/static:/usr/src/app/static
deploy:
mode: replicated
placement:
constraints: [node.role == manager]
restart_policy:
condition: on-failure
web:
image: mathwave/sprint-repo:sprint
networks:
@ -80,13 +56,9 @@ services:
DEBUG: "true"
TELEGRAM_TOKEN: $TELEGRAM_TOKEN
VK_SERVICE_TOKEN: $VK_SERVICE_TOKEN
volumes:
- /sprint-data/static:/usr/src/app/static
command: ./manage.py runserver 0.0.0.0:8000 --noreload --insecure
command: sh -c "./manage.py collectstatic --noinput && ./manage.py runserver 0.0.0.0:8000 --noreload --insecure"
deploy:
mode: replicated
placement:
constraints: [node.role == manager]
restart_policy:
condition: any
update_config:

View File

@ -107,9 +107,7 @@ services:
DEBUG: "false"
TELEGRAM_TOKEN: $TELEGRAM_TOKEN
VK_SERVICE_TOKEN: $VK_SERVICE_TOKEN
volumes:
- /sprint-data/static:/usr/src/app/static
command: ./manage.py runserver 0.0.0.0:8000 --noreload --insecure
command: sh -c "./manage.py collectstatic --noinput && ./manage.py runserver 0.0.0.0:8000 --noreload --insecure"
deploy:
mode: replicated
placement:

View File

@ -12,11 +12,6 @@ http {
proxy_pass http://polling:7998/polling/;
}
location /static/ {
root /var/www/html/;
autoindex off;
}
location / {
proxy_pass http://web:8000/;
}