User Manual

04.15.2025

MANUAL

Upgrade the Docker Image of Pleasanter

## Overview The following is the procedure for upgrading the official Docker image of Pleasanter that you set up. ・[Launch with Docker](getting-started-pleasanter-docker) ・ ・ For information on the official Docker image published on Docker Hub, please refer to the following. ・[implem/pleasanter - Docker Image | Docker Hub](https://hub.docker.com/r/implem/pleasanter) --- ## Procedure The procedure for upgrading is as follows. 1. Stop Pleasanter 2. Add app_data_parameters folder 3. Update parameter file 4. Add new parameter file 5. Change the version written in the file 6. Create container image of next version 7. Run CodeDefiner 8. Check Pleasanter startup ## 1. Stop Pleasanter Execute the following command to stop Pleasanter container. ``` docker compose stop ``` ## 2. Add app_data_parameters Folder If you create a new app_data_parameters folder in this version upgrade and switch to the "" method, follow the steps below. *This step may only be necessary for PostgreSQL. *When using MySQL, the app_data_parameters folder is required. Please continue to use the current folder. <details> <summary> (Click here to open/close the details) </summary> 1. Modify the folder structure as follows. ```text . |-- compose.yaml |-- .env | +-- app_data_parameters | +-- Extensions folder | | +-- Extension files | | | +-- Parameter file | +-- CodeDefiner | +-- Dockerfile | +---Pleasanter +-- Dockerfile ``` 2. Create /CodeDefiner/Dockerfile with the following contents. ``` FROM implem/pleasanter:codedefiner COPY app_data_parameters/ /app/Implem.Pleasanter/App_Data/Parameters/ ENTRYPOINT [ "dotnet", "Implem.CodeDefiner.dll" ] ``` 3. Create Pleasanter/Dockerfile with the following content. ``` ARG VERSION=latest FROM implem/pleasanter:${VERSION} COPY app_data_parameters/ App_Data/Parameters/ ENTRYPOINT [ "dotnet", "Implem.Pleasanter.dll" ] ``` 4. Modify the contents of the .env file. * For the {{Version}} (next version) specified in the environment variable "PLEASANTER_VER", please specify the version of Presanter published on Docker Hub (e.g. latest, 1.4.10.1, etc.). * Please set the same contents as the current .env file except for {{Version}}. ``` POSTGRES_USER={{Sa User}} POSTGRES_PASSWORD={{Sa Password}} POSTGRES_DB={{System DB}} POSTGRES_HOST_AUTH_METHOD=scram-sha-256 POSTGRES_INITDB_ARGS="--auth-host=scram-sha-256 --encoding=UTF-8" PLEASANTER_VER={{Version}} Implem_Pleasanter_Rds_PostgreSQL_SaConnectionString='Server=db;Database={{System DB}};UID={{Sa User}};PWD={{Sa password}}' Implem_Pleasanter_Rds_PostgreSQL_OwnerConnectionString='Server=db;Database=#ServiceName#;UID=#ServiceName#_Owner;PWD={{Owner password}}' Implem_Pleasanter_Rds_PostgreSQL_UserConnectionString='Server=db;Database=#ServiceName#;UID=#ServiceName#_User;PWD={{User password}}' ``` 5. Modify the contents of the compose.yaml file. ``` services: db: container_name: postgres image: postgres:16 environment: - POSTGRES_USER - POSTGRES_PASSWORD - POSTGRES_DB - POSTGRES_HOST_AUTH_METHOD - POSTGRES_INITDB_ARGS volumes: - type: volume source: pg_data target: /var/lib/postgresql/data pleasanter: build: context: . dockerfile: ./Pleasanter/Dockerfile args: - VERSION=${PLEASANTER_VER} container_name: pleasanter_${PLEASANTER_VER} depends_on: - db ports: - '50001:8080' environment: Implem.Pleasanter_Rds_PostgreSQL_SaConnectionString: ${Implem_Pleasanter_Rds_PostgreSQL_SaConnectionString} Implem.Pleasanter_Rds_PostgreSQL_OwnerConnectionString: ${Implem_Pleasanter_Rds_PostgreSQL_OwnerConnectionString} Implem.Pleasanter_Rds_PostgreSQL_UserConnectionString: ${Implem_Pleasanter_Rds_PostgreSQL_UserConnectionString} codedefiner: build: context: . dockerfile: ./CodeDefiner/Dockerfile container_name: codedefiner depends_on: - db environment: Implem.Pleasanter_Rds_PostgreSQL_SaConnectionString: ${Implem_Pleasanter_Rds_PostgreSQL_SaConnectionString} Implem.Pleasanter_Rds_PostgreSQL_OwnerConnectionString: ${Implem_Pleasanter_Rds_PostgreSQL_OwnerConnectionString} Implem.Pleasanter_Rds_PostgreSQL_UserConnectionString: ${Implem_Pleasanter_Rds_PostgreSQL_UserConnectionString} volumes: pg_data: name: ${COMPOSE_PROJECT_NAME:-default}_pg_data_volume ``` </details> ## 3. Update the Parameter File If you have stored a parameter file in the app_data_parameters folder while using the current version, follow the steps below. <details> <summary> (Click here to open/close details) </summary> ### 1. Back up the parameter file 1. Back up the current parameter file. This backup will be used in step 3.3.1. If you set up the Docker image according to the manual, the parameter file will be a json file in the app_data_parameters folder. 2. **This step is not necessary if you are not using the extension.** Back up the current parameter file set in the extension. This backup will be used in step 3.4.1. If you set up the Docker image according to the manual, the file set in the extension will be a file in the following subfolder under the app_data_parameters folder. |Subfolder name|Extension name|Notes| |:---|:---|:---| |CustomDefinitions|"「Extended Column」"|Folder generated when adding columns to departments, groups, and users| |ExtendedFields|"「Extended Fields」"|| |ExtendedHtmls|"「Extended HTML」"|| |ExtendedNavigationMenus|"「Extended Navigation Menu」"|| |ExtendedScripts|"「Extended Scripts」"|| |ExtendedServerScripts|"「Extended Server Scripts」"|| |ExtendedSqls|"「Extended SQL」"|| |ExtendedStyles|"「Extended Styles」"|| ### 2. Prepare the application 1. Download the next version of Pleasanter from the [Download Center](https://pleasanter.org/dlcenter). 2. Unzip the downloaded zip file. 3. The files stored in the unzipped folder "\pleasanter\Implem.Pleasanter\App_Data\Parameters" and subfolders will be used as the parameter files for the next version. ### 3. Reset parameters 1. Reflect the current settings in the parameter file of the next version prepared in step 3.2.3. Use a file comparison/merge tool such as [WinMerge](https://winmerge.org/) to compare the parameter file of the next version with the parameter file of the current backup file obtained in step 3.1.1. and modify the parameter file of the next version. <br>**If Service.json is placed, check that TimezoneDefault is the correct value. Set the time zone valid for the OS of the server where Pleasanter is installed to TimezoneDefault. (For example, "Tokyo Standard Time" for Windows, or "Asia/Tokyo" for Linux.)**<br>[FAQ: I want to know the parameter settings for languages ​​and time zones supported by Pleasanter](https://pleasanter.org/ja/manual/faq-supported-language) 2. Replace the parameter file in the app_data_parameters folder with the parameter file of the next version. ### 4. Reconfiguring extensions **This step is not necessary if you are not using extensions.** 1. Reflect the currently configured contents to the parameter file for the next version of the extension prepared in step 3.2.3. Use a file comparison/merge tool such as [WinMerge](https://winmerge.org/) to compare the parameter file for the next version of the extension with the parameter file for the current backup file obtained in step 3.1.2. and modify the parameter file for the next version of the extension. 2. Replace the parameter file for the extension in the subfolder under the app_data_parameters folder with the parameter file for the next version of the extension. </details> ## 4. Add a New Parameter File To add a new parameter file to the app_data_parameters folder and change the default value, follow the steps below. <details> <summary> (Click here to open/close details) </summary> 1. Download the next version of Pleasanter from the [Download Center](https://pleasanter.org/dlcenter). 2. Unzip the zip file. 3. Copy the target parameter file stored in "\pleasanter\Implem.Pleasanter\App_Data\Parameters" in the unzipped folder to the app_data_parameters folder. 4. Edit the copied parameter file. </details> ## 5. Change the Version Written in the File 1. Check the file that describes the version of Pleasanter. ・For the "[Launch with Docker](getting-started-pleasanter-docker)" method: compose.yaml file ``` image: implem/pleasanter:{{Version}} ``` ・For the "" method: .env file ``` PLEASANTER_VER={{Version}} ``` 2. If {{Version}} is "latest", no change is required. Execute "6. Create a container image for the next version" and subsequent steps. If you have specified the version directly in {{Version}}, change the next version to "the version number published on Docker Hub" or "latest", then execute "6. Create a Container Image for the Next Version" and subsequent steps. ## 6. Create a Container Image for The Next Version Build and update the container image by specifying the --pull option. ``` docker compose build --pull ``` ## 7. Run CodeDefiner Execute the following command. The command to be executed varies depending on the next version. ### Next version is up to ver.1.4.5 ```bash docker compose run --rm codedefiner _rds ``` ### Next version is ver.1.4.6 or later *Only when using Docker image, you need to set arguments /l and /z to the command when upgrading. ```bash docker compose run --rm codedefiner _rds /l "<language>" /z "<timezone>" ``` |Argument|e.g.|Description| |:--|:--|:--| |/l|en|Rewrites the value of DefaultLanguage in Service.json (*1)| |/z|UTC|Rewrites the value of TimeZoneDefault in Service.json (*1)| (*1) For language and time zone, please refer to the following manual page. [FAQ: I want to know the parameter settings for languages ​​and time zones supported by Pleasanter](https://pleasanter.org/en/manual/faq-supported-language) If you use it in a English environment, use the following command. ```bash docker compose run --rm codedefiner _rds /l "en" /z "UTC" ``` If the message "Type "y" (yes) if the license is correct, otherwise type "n" (no)" appears during the process, enter **y**. *The version will be output to the console log as shown below. The version displayed here will always be the "Latest version of Pleasanter published on Docker Hub". The specifications for this console log display are the same even if you specify a version earlier than the latest in the file's {{Version}}, but the database will be created with content that complies with {{Version}}, so there will be no problems with Pleasanter's operation. ```bash <INFO> Starter.Main: Implem.CodeDefiner 1.4.10.1 ``` ## 8. Check that Pleasanter is Running 1. Execute the following command. The current version of Pleasanter container that was stopped and left will be recreated as a container for the next version and will start. ``` docker compose up -d pleasant ``` 2. Access with a browser and log in. ・<http://localhost:50001> 3. After logging in, click "Help" - "Version" in the navigation menu and confirm that the version is correct.
TOP
このページをシェアする
記載された商品名、各製品名は各社の登録商標または商標です。 © Implem Inc.