~qeef/damn-deploy

62495fb80e9e1fc3ac9012108a1f2efd78414eed — Jiri Vlasak 3 months ago cd53862
Clear up upgrade/update sytax
1 files changed, 11 insertions(+), 10 deletions(-)

M README.md
M README.md => README.md +11 -10
@@ 34,10 34,11 @@ Then, you need to clone the damn deploy repository:
    git clone https://git.sr.ht/~qeef/damn-deploy
    cd damn-deploy

The most common usecase is *autostart server and clients*. The following
The most common usecase is *autostart server, clients, and chat*. The following
sections consider *server* setup, setup for *clients* (client and manager),
*chat*, *autostart*, and *update*. Also, see *Damn upkeep* section for periodic
database upkeep scripts.
*chat*, and *autostart* with `systemd`. Then, there is a *How to upgrade*
section that discuss the upgrade/update process. Finally, see the *Damn upkeep*
section for the database periodic upkeep scripts.

Server setup
------------


@@ 145,8 146,8 @@ I assume that the damn deploy repository is cloned to `/root/damn-deploy/`.
       systemctl enable damn.service


How to update
=============
How to upgrade
==============

1. If use `systemd` autostart, stop the damn service first:



@@ 164,7 165,7 @@ How to update

       git stash pop

5. Maybe rebuild some docker images, but it depends on update changes:
5. Maybe rebuild some docker images, but it depends on the upgrade changes:

       docker-compose -f server.yml build --no-cache api
       docker-compose -f server.yml build --no-cache upkeep


@@ 176,8 177,8 @@ How to update

       systemctl start damn.service

Update database structure
-------------------------
Upgrade the database structure
------------------------------

The database structure is rarely to change but it may happen. For new
deployments, there is nothing to do.


@@ 186,7 187,7 @@ However, if you are upgrading from an existing database, you need to run the
upgrade script manually.

All the scripts related to the database structure are stored in `damndb`
directory, starting at `70_...`. Which script should be run when updating the
directory, starting at `70_...`. Which script should be run when upgrading the
database structure is always noted in the [changelog][].

Upgrade to `v0.6.0`


@@ 227,7 228,7 @@ Connect to the database (the password is in `.env` file):
    export DB_HOST=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' damndb)
    psql -h $DB_HOST -d damndb -U damnuser

Run update query:
Run the update query:

    update current_commits set type='splitted' where message='The square was splitted';