From b84b5e9bbf3b1248797717fa0087a500d58a2401 Mon Sep 17 00:00:00 2001 From: Mat Date: Fri, 15 Jul 2022 16:18:17 +0200 Subject: [PATCH] Upgrade Projeqtor to 10.x (breaking changes) WARN: this upgrade is NOT backward compatible. (this project, not Projeqtor itself). Upgrade from v9.5.x to v10.0.x and also brings various improvements: - Update MariaDB to 10.8.x - Update PHP to 8.0.21 - Use a dedicated account for the app to connect to the DB - Change in naming directories (volumes): - fix inconsistencies and typos - add major version number in name to minimize risk when upgrading and allow running multiple versions at the same time (e.g: NRG testing) Before upgrading an existing instance of Projeqtor based on this project, you must: - Stop the service - Take a full backup (Database and files) - Create the required directories (attachments, etc.) - Restore projeqtor files - Start the service - Restore the database - Tests thoroughly --- Dockerfile | 2 +- README.md | 10 +++++----- env.prod | 2 +- prod-local-dirs.yml | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 16d13f8..992e39f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -77,7 +77,7 @@ RUN chmod 755 /start.sh \ && mkdir --mode=770 -p /var/data/projeqtor/logs \ && chown -R www-data:www-data /var/data/projeqtor -ARG PJQ_VERSION=9.5.5 +ARG PJQ_VERSION=10.0.1 # Local: --build-arg PJQ_ARCHIVE_URL=./assets/projeqtorV6.6.6.zip ARG PJQ_ARCHIVE_URL=https://freefr.dl.sourceforge.net/project/projectorria/projeqtorV${PJQ_VERSION}.zip ARG PJQ_ARCHIVE_NAME=projeqtorV${PJQ_VERSION}.zip diff --git a/README.md b/README.md index 2ac32d0..e50c755 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ The following arguments may be use to customize the build: | :-------------------: | :-----------------------------------------------------------------------------------: | :-----------------------------------------: | | `REGISTRY` | `docker.io` | Where to search for base images | | `PROXY_URL` | `` | HTTP proxy | -| `PJQ_VERSION` | `9.5.5` | Projeqtor version | +| `PJQ_VERSION` | `10.0.1` | Projeqtor version | | `PJQ_ARCHIVE_URL` | `https://freefr.dl.sourceforge.net/project/projectorria/projeqtorV${PJQ_VERSION}.zip` | Download URL or **path** | | `PJQ_ARCHIVE_NAME` | `projeqtorV${PJQ_VERSION}.zip` | Archive name | | `PJQ_EXTRACT_DIR` | `projeqtor` | Resulting directory after arhive extraction | @@ -91,10 +91,10 @@ The following environment variables should be added to the `docker-compose.yml` ### Use image -Images are available on the Docker Hub: +Images are available on the [Docker Hub](https://hub.docker.com/r/mraber/projeqtor): ```bash -docker pull mraber/projeqtor:9.5.5-{REV} +docker pull mraber/projeqtor:10.0.1-{REV} ``` ### Build Docker image (projeqtor) @@ -137,7 +137,7 @@ docker-compose --env-file ./env.prod up -d To use dedicated directories: ```bash -sudo mkdir -p /var/data/projeqtor/{database,logs,attachments,documents} +sudo mkdir -p /var/data/projeqtor-v10/{database,logs,attachments,documents} docker-compose --env-file ./env.prod -f docker-compose.yml -f prod-local-dirs.yml up -d ``` @@ -156,5 +156,5 @@ docker-compose stop ```bash docker-compose down -v # If using dedicated directories: -sudo rm -fr /var/data/projeqtor/{database,logs,attachments,documents} +sudo rm -fr /var/data/projeqtor-v10/{database,logs,attachments,documents} ``` diff --git a/env.prod b/env.prod index 6e60c33..3aa1479 100644 --- a/env.prod +++ b/env.prod @@ -1,2 +1,2 @@ -PRJ_TAG=9.5.5-2 +PRJ_TAG=10.0.1-1 PRJ_REGISTRY=docker.io/mraber/ diff --git a/prod-local-dirs.yml b/prod-local-dirs.yml index 0f1e430..9a6d0b6 100644 --- a/prod-local-dirs.yml +++ b/prod-local-dirs.yml @@ -5,23 +5,23 @@ volumes: driver: 'local' driver_opts: type: none - device: /var/data/projeqtor/database + device: /var/data/projeqtor-v10/database o: bind prj_attachments: driver: 'local' driver_opts: type: none - device: /var/data/projeqtor/attachments + device: /var/data/projeqtor-v10/attachments o: bind prj_documents: driver: 'local' driver_opts: type: none - device: /var/data/projeqtor/documents + device: /var/data/projeqtor-v10/documents o: bind prj_logs: driver: 'local' driver_opts: type: none - device: /var/data/projeqtor/logs + device: /var/data/projeqtor-v10/logs o: bind -- GitLab