deploy/README.md
author ymh <ymh.work@gmail.com>
Fri, 14 Jun 2019 16:48:55 +0200
changeset 20 36bdc6e0deb1
parent 14 30f2ac9a7656
child 23 5249c3c623a6
permissions -rw-r--r--
add language update for site and admin user in deploy_db

# Recherchecontributive deployment

The deployment is done with ansible.
A pipfile is available to set it up.
This deployment take 

## Start the deploy

- `deploy.sh <profile> <hg tag>`. Example: `deploy.sh test tip`

## configuration file:

- `hosts/hosts.<profile>`
- `group_vars/<profile>.yml`
- `host_vars/<hostname>/base.yml` base `host_vars/base.yml.tmpl`

## Database deploy

- `deploy_db.sh [CONFIG] [DB_FILE_PATH] [ORIGIN_URL]`

With:
- `CONFIG`: test or prod
- `DB_FILE_PATH`: The database definition file (SQL)
- `ORIGIN_URL`: The site base URL matching the database file

This script call the `deploy_db.yml` ansible script and perform the following operations
- copy the sql file to the server
- apply the sql file with wp-cli `db` command
- search and replace the origin url (wp-cli search-replace)
- set `template_root` option (wp-cli option)
- delete _site_transient_update_themes and _site_transient_theme_roots options (wp-cli option)
- update admin password (wp-cli user update)
- flush cache (wp-cli cache flush)