Features: 1) Add new make-messages.ps1 and compile-messages.ps1 scripts for Windows localization workflow; 2) Update Docker ENTRYPOINT scripts to use bash for app, worker, stock_updater, and beat containers; 3) Bump project version to 2.9.1 in pyproject.toml and settings;
Fixes: 1) Ensure `install.ps1` handles non-zero exit codes gracefully; 2) Remove redundant `vm.overcommit_memory` Docker sysctl setting; 3) Add explicit exit command to `starter.ps1` for clean terminations; Extra: Minor formatting and consistency improvements across ENTRYPOINT scripts;
This commit is contained in:
parent
f37206ed4e
commit
118882ac1b
15 changed files with 52 additions and 12 deletions
|
|
@ -47,4 +47,4 @@ RUN chmod +x /usr/local/bin/app-entrypoint.sh
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
ENTRYPOINT ["app-entrypoint.sh"]
|
ENTRYPOINT ["/usr/bin/bash", "app-entrypoint.sh"]
|
||||||
|
|
@ -47,4 +47,4 @@ RUN chmod +x /usr/local/bin/beat-entrypoint.sh
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
ENTRYPOINT ["beat-entrypoint.sh"]
|
ENTRYPOINT ["/usr/bin/bash", "beat-entrypoint.sh"]
|
||||||
|
|
@ -47,4 +47,4 @@ RUN chmod +x /usr/local/bin/stock-updater-entrypoint.sh
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
ENTRYPOINT ["stock-updater-entrypoint.sh"]
|
ENTRYPOINT ["/usr/bin/bash", "stock-updater-entrypoint.sh"]
|
||||||
|
|
@ -47,4 +47,4 @@ RUN chmod +x /usr/local/bin/worker-entrypoint.sh
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
ENTRYPOINT ["worker-entrypoint.sh"]
|
ENTRYPOINT ["/usr/bin/bash", "worker-entrypoint.sh"]
|
||||||
|
|
@ -70,7 +70,6 @@ services:
|
||||||
logging: *default-logging
|
logging: *default-logging
|
||||||
sysctls:
|
sysctls:
|
||||||
net.ipv4.tcp_keepalive_time: 60
|
net.ipv4.tcp_keepalive_time: 60
|
||||||
vm.overcommit_memory: 1
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "redis-cli", "-a", "$REDIS_PASSWORD", "ping" ]
|
test: [ "CMD", "redis-cli", "-a", "$REDIS_PASSWORD", "ping" ]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import logging
|
||||||
from os import getenv, name
|
from os import getenv, name
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
EVIBES_VERSION = "2.9.0"
|
EVIBES_VERSION = "2.9.1"
|
||||||
|
|
||||||
BASE_DIR = Path(__file__).resolve().parent.parent.parent
|
BASE_DIR = Path(__file__).resolve().parent.parent.parent
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "eVibes"
|
name = "eVibes"
|
||||||
version = "2.9.0"
|
version = "2.9.1"
|
||||||
description = "eVibes is an open-source eCommerce backend service built with Django. It’s designed for flexibility, making it ideal for various use cases and learning Django skills. The project is easy to customize, allowing for straightforward editing and extension."
|
description = "eVibes is an open-source eCommerce backend service built with Django. It’s designed for flexibility, making it ideal for various use cases and learning Django skills. The project is easy to customize, allowing for straightforward editing and extension."
|
||||||
authors = ["fureunoir <contact@fureunoir.com>"]
|
authors = ["fureunoir <contact@fureunoir.com>"]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
|
||||||
|
|
@ -18,4 +18,4 @@ else
|
||||||
--bind 0.0.0.0:8000 \
|
--bind 0.0.0.0:8000 \
|
||||||
--workers 12 \
|
--workers 12 \
|
||||||
--timeout 120
|
--timeout 120
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -5,4 +5,4 @@ set -e
|
||||||
poetry run python manage.py await_services
|
poetry run python manage.py await_services
|
||||||
|
|
||||||
# run beat
|
# run beat
|
||||||
poetry run celery -A evibes beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler
|
poetry run celery -A evibes beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler
|
||||||
|
|
|
||||||
|
|
@ -5,4 +5,4 @@ set -e
|
||||||
poetry run python manage.py await_services
|
poetry run python manage.py await_services
|
||||||
|
|
||||||
# run stock_updater
|
# run stock_updater
|
||||||
poetry run celery -A evibes worker --pool=prefork --concurrency=1 --queues=stock_updater --loglevel=info --max-tasks-per-child=1
|
poetry run celery -A evibes worker --pool=prefork --concurrency=1 --queues=stock_updater --loglevel=info --max-tasks-per-child=1
|
||||||
|
|
|
||||||
|
|
@ -5,4 +5,4 @@ set -e
|
||||||
poetry run python manage.py await_services
|
poetry run python manage.py await_services
|
||||||
|
|
||||||
# run worker and metrics exporter
|
# run worker and metrics exporter
|
||||||
poetry run celery -A evibes worker --pool=prefork --concurrency=8 --loglevel=info -E --queues=default --prefetch-multiplier=1 --max-tasks-per-child=100 --max-memory-per-child=512000 --soft-time-limit=3600 --time-limit=7200 & /usr/local/bin/celery-prometheus-exporter
|
poetry run celery -A evibes worker --pool=prefork --concurrency=8 --loglevel=info -E --queues=default --prefetch-multiplier=1 --max-tasks-per-child=100 --max-memory-per-child=512000 --soft-time-limit=3600 --time-limit=7200 & /usr/local/bin/celery-prometheus-exporter
|
||||||
|
|
|
||||||
0
scripts/Windows/compile-messages.ps1
Normal file
0
scripts/Windows/compile-messages.ps1
Normal file
|
|
@ -2,6 +2,9 @@ Set-StrictMode -Version Latest
|
||||||
$ErrorActionPreference = 'Stop'
|
$ErrorActionPreference = 'Stop'
|
||||||
|
|
||||||
.\scripts\Windows\starter.ps1
|
.\scripts\Windows\starter.ps1
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
exit $LASTEXITCODE
|
||||||
|
}
|
||||||
|
|
||||||
if (-not (Test-Path '.env'))
|
if (-not (Test-Path '.env'))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
37
scripts/Windows/make-messages.ps1
Normal file
37
scripts/Windows/make-messages.ps1
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
Set-StrictMode -Version Latest
|
||||||
|
$ErrorActionPreference = 'Stop'
|
||||||
|
|
||||||
|
.\scripts\Windows\starter.ps1
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
exit $LASTEXITCODE
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not (Test-Path '.env'))
|
||||||
|
{
|
||||||
|
Write-Warning ".env file not found. Exiting without running Docker steps."
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Updating PO files..." -ForegroundColor Magenta
|
||||||
|
docker compose exec app poetry run python manage.py makemessages -l en_GB -l ar_AR -l cs_CZ -l da_DK -l de_DE -l en_US -l es_ES -l fr_FR -l hi_IN -l it_IT -l ja_JP -l kk_KZ -l nl_NL -l pl_PL -l pt_BR -l ro_RO -l ru_RU -l zh_Hans
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
exit $LASTEXITCODE
|
||||||
|
}
|
||||||
|
Write-Host "PO files updated successfully!" -ForegroundColor Green
|
||||||
|
|
||||||
|
Write-Host "Fixing fuzzy entries..." -ForegroundColor Magenta
|
||||||
|
docker compose exec app poetry run python manage.py fix_fuzzy
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
exit $LASTEXITCODE
|
||||||
|
}
|
||||||
|
Write-Host "Fuzzy entries fixed successfully!" -ForegroundColor Green
|
||||||
|
|
||||||
|
Write-Host "Translating with DeepL..." -ForegroundColor Magenta
|
||||||
|
docker compose exec app poetry run python manage.py deepl_translate -l en-gb -l ar-ar -l cs-cz -l da-dk -l de-de -l en-us -l es-es -l fr-fr -l hi-in -l it-it -l ja-jp -l kk-kz -l nl-nl -l pl-pl -l pt-br -l ro-ro -l ru-ru -l zh-hans -a core -a geo -a payments -a vibes_auth -a blog -a root
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
exit $LASTEXITCODE
|
||||||
|
}
|
||||||
|
Write-Host "Translated successfully!" -ForegroundColor Green
|
||||||
|
|
||||||
|
Write-Host ""
|
||||||
|
Write-Host "You can now use compile-messages.ps1 script." -ForegroundColor Cyan
|
||||||
|
|
@ -18,4 +18,5 @@ if (-not (Test-Path $artPath))
|
||||||
}
|
}
|
||||||
|
|
||||||
Get-Content -Raw -Path $artPath | ForEach-Object { Write-Host "$purple$_$reset" }
|
Get-Content -Raw -Path $artPath | ForEach-Object { Write-Host "$purple$_$reset" }
|
||||||
Write-Host "`n by WISELESS TEAM`n" -ForegroundColor Gray
|
Write-Host "`n by WISELESS TEAM`n" -ForegroundColor Gray
|
||||||
|
exit 0
|
||||||
Loading…
Reference in a new issue