Update and rollback #
Application update #
In the apidq folder with docker-compose.yml
file execute commands
docker-compose pull
docker-compose up -d
Database update #
The exact versions of the required dictionaries are indicated in the block Requirements for versions of dictionaries
on the page
changelog
If a dictionary is highlighted in bold text and a plus sign is indicated above it, it means that the dictionary has been updated for this version, otherwise updating the dictionary is not required.
For each updated dictionary, you need drop old dictionary SCHEMA
and restore new dictionary SCHEMA
from dump (example for service
and ru
)
psql -U user_apidq -h 127.0.0.1 -d db_apidq -c "DROP SCHEMA services CASCADE;"
pg_restore --no-owner --no-acl -Fc -U user_apidq -h 127.0.0.1 -d db_apidq services_20210831.dump
psql -U user_apidq -h 127.0.0.1 -d db_apidq -c "DROP SCHEMA ru CASCADE;"
pg_restore --no-owner --no-acl -Fc -U user_apidq -h 127.0.0.1 -d db_apidq ru_20210831.dump
Application rollback #
In the apidq folder edit docker-compose.yaml
and replace latest
to specific version (example 1.1.9) for docker images
version: "3.0"
services:
gateway:
image: "gitlab.apiship.ru:5050/apidq/apidq/apidq-service-gateway:1.1.9"
ports:
- "8080:8080"
volumes:
- ./gateway-config.toml:/dist/config.toml
address:
image: "gitlab.apiship.ru:5050/apidq/apidq/apidq-service-address:1.1.9"
volumes:
- ./address-config.toml:/dist/config.toml
and run commands
docker-compose pull
docker-compose up -d
Database rollback #
The exact versions of the required dictionaries are indicated in the block Requirements for versions of dictionaries
on the page
changelog
Download the dictionaries that you need and for each of them run the command (example for service
and ru
)
psql -U user_apidq -h 127.0.0.1 -d db_apidq -c "DROP SCHEMA services CASCADE;"
pg_restore --no-owner --no-acl -Fc -U user_apidq -h 127.0.0.1 -d db_apidq services_20210831.dump
psql -U user_apidq -h 127.0.0.1 -d db_apidq -c "DROP SCHEMA ru CASCADE;"
pg_restore --no-owner --no-acl -Fc -U user_apidq -h 127.0.0.1 -d db_apidq ru_20210831.dump