-
Notifications
You must be signed in to change notification settings - Fork 131
Deployment
This page describes how Tatoeba is being deployed.
-
Pull any translations from Transifex and commit them.
./tools/update-translations.sh git add src/Locale/ git commit -m "Pull translations from Transifex" git show | grep -E '^(diff|\+msgstr "[^"])' | less # optionally have a look at the new UI strings git push
-
Merge
dev
intomaster
, tag asprod_{YYYY}-{MM}-{DD}
and push everything.git checkout master git merge dev git tag prod_{YYYY}-{MM}-{DD} git push git push --tags
-
Connect via SSH to the server.
-
Pull the code in the
/var/code
directory and pull (the branch should be set to master already).cd /var/code git checkout master git pull
-
Run the script to create a prod folder (create-new-prod-folder.sh).
cd /var ./create-new-prod-folder.sh --no-dry-run
-
Activate the new prod folder (set-prod-folder.sh).
./set-prod-folder.sh {SHA}
-
Reload php-fpm to reset the cache.
systemctl reload php7.3-fpm
-
Connect via SSH to the server.
-
Go to the website directory and pull the code. (We use
git reset
in order to avoid conflicts with new translations files that are constantly being pulled from Transifex.)cd /srv/tatoeba.org/www git reset --hard origin/dev && git pull
-
Run migration scripts, if any.
bin/cake migrations migrate
-
Update dependencies if
composer.lock
was modifiedcomposer install
-
Update assets, if needed.
bin/cake asset_compress build -f
-
Reload php-fpm to reset the cache.
systemctl reload php7.3-fpm
-
Connect to the database using
mariadb tatoeba
and run theadd_new_language()
SQL procedureCALL add_new_language('xxx', 0000); # replace xxx with the actual ISO code and 0000 with the list number
-
Create new indexes (this automatically reloads Manticore configuration too)
idx=xxx # replace xxx with the actual ISO code /var/www-prod/bin/cake sphinx_indexes update main $idx /var/www-prod/bin/cake sphinx_indexes update delta $idx
-
Make sure it works
idx=xxx # replace xxx with the actual ISO code echo "select id,text_len from ${idx}_main_index,${idx}_delta_index limit 10;" | mysql -P9306 --protocol=tcp
If you have any question, if something in this page was not clear enough for you, or if you have suggestions to improve it, please let us know: [email protected].