Published May 4, 2020 | Version 2.3.0
Software Open

gwu-libraries/sfm-docker: Version 2.3.0

  • 1. George Washington University Libraries
  • 2. The George Washington University

Description

Changes in this version include:

  • Upgrade of Postgres database from 9.4 to 9.6. See required upgrade steps below.
  • Optional cookie consent pop-up (#1009). Instructions for enabling below.
  • Optional GW footer (#1003). Instructions for enabling below.

For a complete list of tickets, see sfm-ui milestone 2.3.0.

Upgrading Postgres

Create a backup Before doing the upgrade, we recommend you first create a backup of the database, using the following command, where pgdump is the name of the backup file:

docker exec sfm_db_1 pg_dumpall -U postgres > pgdump

You can then review the dumpfile: cat pgdump | less

Upgrade the database

  1. Start the upgrade using the usual steps: docker-compose stop -t 180 twitterstreamharvester docker-compose stop -t 45

  2. Make a copy of your existing docker-compose.yml and .env files. cp docker-compose.yml old.docker-compose.yml cp .env old.env

  3. Remove the existing database container docker-compose rm -v db

  4. Create an initial Postgres 9.6 database in a new directory alongside the existing postgres database. Use the path for your /sfm-data/postgresql directory as the first element of the volume parameter in the docker run command. Substitute your actual postgres password (this is in your .env file) for password. For example, if your existing database is within /sfm-data/postgresql (it is probably in /sfm-data/postgresql/data) and your password is password123, the command would look like:

    docker run --name postgres -d -v /sfm-data/postgresql/9.6/data:/var/lib/postgresql/data \
         -e POSTGRES_PASSWORD=password123 postgres:9.6
    
  5. Stop and remove the postgres container: docker stop postgres docker rm -v postgres

  6. Run the postgres upgrade image, changing the sfm-data path to match yours:

    docker run --rm \
       -v /sfm-data/postgresql/data:/var/lib/postgresql/9.4/data \
       -v /sfm-data/postgresql/9.6/data:/var/lib/postgresql/9.6/data \
       tianon/postgres-upgrade:9.4-to-9.6
    

Proceed with the rest of the SFM upgrade Continue with the SFM upgrade, following step 3 of the upgrade instructions, "Get the latest example.prod.docker-compose.yml".

Cookie consent popup

Version 2.3.0 adds a new configurable cookie consent popup. The user's consent is valid until the user clears their browser cookies, for a maximum of 365 days. This feature is disabled by default.

To enable and configure the cookie consent popup, you will need to modify two files in your sfm-docker directory:

  1. docker-config.yml. View https://github.com/gwu-libraries/sfm-docker/compare/2.2.0...2.3.0 to see the new lines added to example.prod.docker-compose.yml and example.docker-compose.yml. Apply the same changes to your docker-config.yml.
  2. .env (environment settings file). View https://github.com/gwu-libraries/sfm-docker/compare/2.2.0...2.3.0 to see the new lines added to example.env. Copy these new lines into your .env file. Configure the new variables as follows:
    1. Set SFM_ENABLE_COOKIE_CONSENT to True.
    2. Modify SFM_COOKIE_CONSENT_HTML to your institution's preferred message text. Note that the text may include HTML tags; for example, you may wish to use <a href> to link to your institution's privacy policy.
    3. If desired, modify SFM_COOKIE_CONSENT_BUTTON_TEXT to change the wording on the button that closes the message banner. The default wording is I consent.
GW footer

Version 2.3.0 adds a new, GW-specific footer which is disabled by default. When enabled, the GW footer appears below the standard footer. If you opt to use this footer, you will need to modify two files in your sfm-docker directory:

  1. In your .env file, set SFM_ENABLE_GW_FOOTER to True. View https://github.com/gwu-libraries/sfm-docker/compare/2.2.0...2.3.0 to see the new lines added to example.env.
  2. In your docker-compose.yml file, add SFM_ENABLE_GW_FOOTER to the environment variables for the ui container. View https://github.com/gwu-libraries/sfm-docker/compare/2.2.0...2.3.0 to see the new lines added to example.prod.docker-compose.yml and example.docker-compose.yml.

https://github.com/gwu-libraries/sfm-docker/compare/2.2.0...2.3.0

Files

gwu-libraries/sfm-docker-2.3.0.zip

Files (16.3 kB)

Name Size Download all
md5:961e57f8827a72e99cce0f925ff1281d
16.3 kB Preview Download

Additional details