User Manual

04.11.2025

MANUAL

Source code in GitHub repository and running on Docker

## Overview This article explains how to download source code from the [Pleasanter's official GitHub repository](https://github.com/Implem/Implem.Pleasanter), create a Docker container, and start Pleasanter. This procedure allows you to verify operation when you modify the source code. ・Part 1: Setup procedure ・Part 2: Upgrade procedure ・Part 3: Stopping and deleting the container ## Limitations 1. When running Pleasanter with Docker, when changing the parameter file settings, not only stop and restart Pleasanter, but also re-run the build using the "docker compose build" command. If you have not built it, the parameter file changes will not be reflected even if you restart Pleasanter. 2. When using Docker with MySQL, the Pleasanter version must be 1.4.10.0 or later. Pleasanter has supported MySQL since version 1.4.9.0, but this procedure can only be performed with version 1.4.10.0 or later. ## Prerequisites 1. In the "docker-compose.yml" described in this procedure, the official Docker image of PostgreSQL or MySQL is specified as the database server, and the operation of the database server depends on the specifications of each Docker image. <br/> ・[postgres - Official Image | Docker Hub](https://hub.docker.com/_/postgres/) <br/> ・[mysql - Official Image | Docker Hub](https://hub.docker.com/_/mysql/) 2. Use Git and Docker Compose commands. <br/> ・[Git](https://git-scm.com/) <br/> ・[Docker Compose | Docker Docs](https://docs.docker.com/compose/) <br/> *This procedure assumes that users have some practical experience with Git and Docker Compose CLI commands. Please check the official documentation for the concept and specifications of each command. 3. Use Docker Compose to create a Docker image from the entire set of Pleasanter source code. Prisanter is started in a Docker container. --- ## Part 1: Setup Procedure The steps to set up Pleasanter are as follows. 1. Clone the GitHub repository 2. Edit files related to container operation 1. .env 2. docker-compose.yml 3. Implem.Pleasanter\Dockerfile 4. Implem.CodeDefiner\Dockerfile 5. docker-entrypoint-initdb.d\pleasanter.sql 3. Edit parameter files 1. Rds.json 2. Service.json 4. Build container image 5. Run CodeDefiner 6. Start Pleasanter ### 1. Clone the GitHub repository Execute the following command to download the source code of Pleasanter from the remote repository on GitHub. ``` git clone https://github.com/Implem/Implem.Pleasanter ``` Verify that the following folders have been created: ```text . +-- Implem.Pleasanter +-- .git +-- .github +-- Implem.CodeDefiner +-- Implem.DefinitionAccessor +-- Implem.DisplayAccessor +-- Implem.Factory +-- Implem.Libraries +-- Implem.ParameterAccessor +-- Implem.Pleasanter +-- …… | | (The rest is omitted) ``` ### 2. Editing files related to container operation Edit the following files. 1. Describe the environment variables .env 2. Describe the Docker image configuration docker-compose.yml 3. Describe the build contents of CodeDefiner Implem.CodeDefiner\Dockerfile 4. Describe the build contents of Pleasanter Implem.Pleasanter\Dockerfile 5. Describe the SQL for creating a MySQL user account docker-entrypoint-initdb.d\pleasanter.sql #### 1. Edit ".env" Create a new "\Implem.Pleasanter\\.env" and edit it as follows. **For PostgreSQL** <details> <summary> (Click here to open/close the details) </summary> An example of an .env file. Please modify {{ ... }} as appropriate, referring to the explanation below. ```txt 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" 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}}' ``` ***Description** The official Docker image uses environment variables beginning with POSTGRES for PostgreSQL. When the container is initialized, initdb is executed and the initial settings for PostgreSQL are performed using the environment variable values. [postgres - Official Image | Docker Hub](https://hub.docker.com/_/postgres) [docker-library/postgres: Docker Official Image packaging for Postgres](https://github.com/docker-library/postgres) SaConnectionString is a single line that initially contains the settings for connecting to PostgreSQL as a superuser. The contents of the PostgreSQL environment variables and the contents written in SaConnectionString must match. |Name|Body| |---|---| |Server|Set to the service name (db) in the Compose file| |Database|Match with the POSTGRES_DB environment variable| |UID|Match with the POSTGRES_USER environment variable| |PWD|Match with the POSTGRES_PASSWORD environment variable| OwnerConnectionString and UserConnectionString are each a single line that represents the settings for connecting with each user. |Name|Body| |---|---| |PWD|Any password string. It is recommended that the Owner and User passwords are different| </details> **For MySQL** <details> <summary> (Click here to open/close details) </summary> An example of an .env file. Please modify {{ ... }} as appropriate, referring to the explanation below. ```txt MYSQL_ROOT_PASSWORD={{Sa Password}} Implem_Pleasanter_Rds_MySQL_SaConnectionString='Server=db;Database=mysql;UID=root;PWD={{Sa password}}' Implem_Pleasanter_Rds_MySQL_OwnerConnectionString='Server=db;Database=#ServiceName#;UID=#ServiceName#_Owner;PWD={{Owner password}}' Implem_Pleasanter_Rds_MySQL_UserConnectionString='Server=db;Database=#ServiceName#;UID=#ServiceName#_User;PWD={{User password}}' ``` ***Description** Among the environment variables required for the official MySQL Docker image, this procedure describes MYSQL_ROOT_PASSWORD, which is the password setting destination for the default superuser account (root). [mysql - Official Image | Docker Hub](https://hub.docker.com/_/mysql) [docker-library/mysql: Docker Official Image packaging for MySQL Community Server](https://github.com/docker-library/mysql) |Name|Body| |---|---| |MYSQL_ROOT_PASSWORD|Specify an arbitrary password string| SaConnectionString is a one-line setting for connecting to MySQL as a superuser. The contents of the MySQL environment variables and the contents written in SaConnectionString must match. |Name|Body| |---|---| |Server|Specify the service name (db) in the Compose file| |Database|Specify the default system database name (mysql) for MySQL| |UID|Specify the default superuser name (root) for MySQL| |PWD|Match it to the MYSQL_ROOT_PASSWORD environment variable| OwnerConnectionString and UserConnectionString are each a single line that represents the settings for connecting with each user. |Name|Body| |---|---| |PWD|Any password string. It is recommended that the passwords for Owner and User are different| </details> #### 2. Edit "docker-compose.yml" Open "\Implem.Pleasanter\docker-compose.yml" and edit as follows. **For PostgreSQL** <details> <summary> (Click here to open/close the details) </summary> ```txt services: pleasanter: build: context: . dockerfile: ./Implem.Pleasanter/Dockerfile 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} container_name: Implem.Pleasanter depends_on: - db ports: - '50001:8080' codedefiner: build: context: . dockerfile: ./Implem.CodeDefiner/Dockerfile 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} container_name: Implem.CodeDefiner depends_on: - db 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 volumes: pg_data: name: ${COMPOSE_PROJECT_NAME:-default}_pg_data_volume ``` </details> **・For MySQL** <details> <summary>(Click here to open/close the details) </summary> ```txt services: pleasanter: build: context: . dockerfile: ./Implem.Pleasanter/Dockerfile environment: Implem.Pleasanter_Rds_MySQL_SaConnectionString: ${Implem_Pleasanter_Rds_MySQL_SaConnectionString} Implem.Pleasanter_Rds_MySQL_OwnerConnectionString: ${Implem_Pleasanter_Rds_MySQL_OwnerConnectionString} Implem.Pleasanter_Rds_MySQL_UserConnectionString: ${Implem_Pleasanter_Rds_MySQL_UserConnectionString} container_name: Implem.Pleasanter depends_on: db: condition: service_healthy ports: - '50001:8080' codedefiner: build: context: . dockerfile: ./Implem.CodeDefiner/Dockerfile environment: Implem.Pleasanter_Rds_MySQL_SaConnectionString: ${Implem_Pleasanter_Rds_MySQL_SaConnectionString} Implem.Pleasanter_Rds_MySQL_OwnerConnectionString: ${Implem_Pleasanter_Rds_MySQL_OwnerConnectionString} Implem.Pleasanter_Rds_MySQL_UserConnectionString: ${Implem_Pleasanter_Rds_MySQL_UserConnectionString} container_name: Implem.CodeDefiner depends_on: db: condition: service_healthy db: container_name: mysql image: mysql:8.4 environment: - MYSQL_ROOT_PASSWORD volumes: - type: volume source: my_data target: /var/lib/mysql - ./docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d healthcheck: test: mysqladmin ping -h 127.0.0.1 -u root -p${MYSQL_ROOT_PASSWORD} interval: 10s timeout: 10s retries: 6 volumes: my_data: name: ${COMPOSE_PROJECT_NAME:-default}_my_data_volume ``` </details> #### 3. Edit "Implem.CodeDefiner\Dockerfile" Open "\Implem.Pleasanter\Implem.CodeDefiner\Dockerfile" and edit as follows. **・Common to PostgreSQL/MySQL** <details> <summary> (Click here to open/close details) </summary> ```txt FROM mcr.microsoft.com/dotnet/runtime:8.0 AS base FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /src COPY ["Implem.CodeDefiner/Implem.CodeDefiner.csproj", "Implem.CodeDefiner/"] COPY ["Implem.DefinitionAccessor/Implem.DefinitionAccessor.csproj", "Implem.DefinitionAccessor/"] COPY ["Implem.ParameterAccessor/Implem.ParameterAccessor.csproj", "Implem.ParameterAccessor/"] COPY ["Implem.DisplayAccessor/Implem.DisplayAccessor.csproj", "Implem.DisplayAccessor/"] COPY ["Implem.Libraries/Implem.Libraries.csproj", "Implem.Libraries/"] COPY ["Rds/Implem.IRds/Implem.IRds.csproj", "Rds/Implem.IRds/"] COPY ["Implem.Factory/Implem.Factory.csproj", "Implem.Factory/"] COPY ["Rds/Implem.PostgreSql/Implem.PostgreSql.csproj", "Rds/Implem.PostgreSql/"] COPY ["Rds/Implem.SqlServer/Implem.SqlServer.csproj", "Rds/Implem.SqlServer/"] COPY ["Rds/Implem.MySql/Implem.MySql.csproj", "Rds/Implem.MySql/"] COPY ["Implem.Pleasanter/Implem.Pleasanter.csproj", "Implem.Pleasanter/"] RUN dotnet restore "Implem.CodeDefiner/Implem.CodeDefiner.csproj" COPY . . RUN dotnet build "Implem.CodeDefiner/Implem.CodeDefiner.csproj" -c Release -o /app/build/Implem.CodeDefiner RUN dotnet build "Implem.Pleasanter/Implem.Pleasanter.csproj" -c Release -o /app/build/Implem.Pleasanter FROM build AS publish RUN dotnet publish "Implem.CodeDefiner/Implem.CodeDefiner.csproj" -c Release -o /app/publish/Implem.CodeDefiner RUN dotnet publish "Implem.Pleasanter/Implem.Pleasanter.csproj" -c Release -o /app/publish/Implem.Pleasanter FROM base AS final WORKDIR /app COPY --from=publish /app/publish . WORKDIR /app/Implem.CodeDefiner ENTRYPOINT ["dotnet", "Implem.CodeDefiner.dll"] ``` </details> #### 4. Edit "Implem.Pleasanter\Dockerfile" Open "\Implem.Pleasanter\Implem.Pleasanter\Dockerfile" and edit as follows. **・Common to PostgreSQL/MySQL** <details> <summary> (Click here to open/close details) </summary> ```txt FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base RUN apt-get update && apt-get install -y \ libgdiplus \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* WORKDIR /app EXPOSE 8080 FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /src COPY ["Implem.Pleasanter/Implem.Pleasanter.csproj", "Implem.Pleasanter/"] COPY ["Implem.DefinitionAccessor/Implem.DefinitionAccessor.csproj", "Implem.DefinitionAccessor/"] COPY ["Implem.ParameterAccessor/Implem.ParameterAccessor.csproj", "Implem.ParameterAccessor/"] COPY ["Implem.DisplayAccessor/Implem.DisplayAccessor.csproj", "Implem.DisplayAccessor/"] COPY ["Implem.Libraries/Implem.Libraries.csproj", "Implem.Libraries/"] COPY ["Rds/Implem.IRds/Implem.IRds.csproj", "Rds/Implem.IRds/"] COPY ["Implem.Plugins/Implem.Plugins.csproj", "Implem.Plugins/"] COPY ["Implem.Factory/Implem.Factory.csproj", "Implem.Factory/"] COPY ["Rds/Implem.PostgreSql/Implem.PostgreSql.csproj", "Rds/Implem.PostgreSql/"] COPY ["Rds/Implem.SqlServer/Implem.SqlServer.csproj", "Rds/Implem.SqlServer/"] COPY ["Rds/Implem.MySql/Implem.MySql.csproj", "Rds/Implem.MySql/"] RUN dotnet restore "Implem.Pleasanter/Implem.Pleasanter.csproj" COPY . . WORKDIR "/src/Implem.Pleasanter" RUN dotnet build "Implem.Pleasanter.csproj" -c Release -o /app/build FROM build AS publish RUN dotnet publish "Implem.Pleasanter.csproj" -c Release -o /app/publish FROM base AS final WORKDIR /app COPY --from=publish /app/publish . ENTRYPOINT ["dotnet", "Implem.Pleasanter.dll"] ``` </details> #### 5. Create the "docker-entrypoint-initdb.d" folder and write SQL statements If you are using PostgreSQL, this step is not necessary. If you are using MySQL, follow the steps below. <details> <summary> (Click here to open/close the details) </summary> 1. Create a new folder "\Implem.Pleasanter\docker-entrypoint-initdb.d". 2. In the "\Implem.Pleasanter\docker-entrypoint-initdb.d" folder, store the "pleasanter.sql" file, which contains the SQL for creating a MySQL user account. ***Description** The "Implem.Pleasanter\docker-entrypoint-initdb.d" folder is automatically mounted to the "docker-entrypoint-initdb.d" directory of the MySQL container by the "volumes" setting under the "db" service in the docker-compose.yml file. The SQL commands written in the files in the "docker-entrypoint-initdb.d" directory mounted to the container are automatically executed when the MySQL container starts. ・Example of creating a pleasanter.sql file ``` create user 'Implem.Pleasanter_Owner'@'%' identified by '{{Owner password}}'; grant all on `Implem.Pleasanter`.* to 'Implem.Pleasanter_Owner'@'%' with grant option; create user 'Implem.Pleasanter_User'@'%' identified by '{{User password}}'; grant select, insert, update, delete, create routine, alter routine on `Implem.Pleasanter`.* to 'Implem.Pleasanter_User'@'%'; ``` In the above example, the database name for Pleasanter is specified as "Implem.Pleasanter", which is the default value of "Name" in "[Service.json](/en/manual/service-json)". If you change "Name" in "[Service.json](/en/manual/service-json)" from the default value, make sure that the part where the database name is specified in the SQL statement (the "Implem.Pleasanter" part above) is the same as the part where "Name" in "[Service.json](/en/manual/service-json)" is changed. Also, make sure that the password string for each MySQL user account specified after "identified by" matches the .env file in step 2.1. </details> ### 3. Writing the parameter file Edit the following file. 1. Describe the database configuration information "[Rds.json](/en/manual/rds-json)" 2. Describe the language, time zone, etc. "[Service.json](/en/manual/service-json)" #### 1. Edit "[Rds.json](/en/manual/rds-json)" Open "\Implem.Pleasanter\Implem.Pleasanter\App_Data\Parameters\Rds.json" and set "Dbms" to "PostgreSQL" (default) or "MySQL". Modify any other items in "[Rds.json](/en/manual/rds-json)" that you want to change from the default. **Example of PostgreSQL modifications** <details> <summary> (Click here to open and close the details) </summary> ```txt "Dbms": "PostgreSQL", "Provider": "Local", "SaConnectionString": null, "OwnerConnectionString": null, "UserConnectionString": null, "SqlCommandTimeOut": 0, "MinimumTime": 3, "DeadlockRetryCount": 4, "DeadlockRetryInterval": 1000, "DisableIndexChangeDetection": true, "SysLogsSchemaVersion": 2 } ``` </details> **・MySQL modification example** <details> <summary> (Click here to open/close details) </summary> ```txt { "Dbms": "MySQL", "Provider": "Local", "SaConnectionString": null, "OwnerConnectionString": null, "UserConnectionString": null, "SqlCommandTimeOut": 0, "MinimumTime": 3, "DeadlockRetryCount": 4, "DeadlockRetryInterval": 1000, "DisableIndexChangeDetection": true, "SysLogsSchemaVersion": 2 } ``` </details> #### 2. Edit "[Service.json](/en/manual/service-json)" Open "\Implem.Pleasanter\Implem.Pleasanter\App_Data\Parameters\Service.json" and modify "TimeZoneDefault" and "DefaultLanguage". **Modification example (for Japanese environment)** |Body|e.g.| |:--|:--| |TimeZoneDefault|UTC| |DefaultLanguage|en| For language and time zone, please refer to the following manual page. ・[FAQ:I want to know the supported languages and timezone parameter setting values in Pleasanter](faq-supported-language) ***Description** If you edit and set up "[Service.json](/en/manual/service-json)" as in this procedure, you can omit specifying the /l /z options when running CodeDefiner. ・ ### 4. Build the container image In all the following steps, the current directory should be "Implem.Pleasanter" confirmed in step 1 above. Execute the following command ```txt cd Implem.Pleasanter ``` Execute the following command. Depending on your environment, the initial build may take 10 to 15 minutes. ```bash docker compose build ``` ### 5. Run CodeDefiner Execute the following command. ```bash docker compose run --rm codedefiner _rds ``` If you get the message "Type "y" (yes) if the license is correct, otherwise type "n" (no)," enter **y**. ### 6. Start Pleasanter Create a container and start Pleasanter. ```bash docker compose up -d pleasanter ``` Access with a browser. <http://localhost:50001> Enter "Login ID: Administrator" and "Initial password: pleasanter" on the login screen. After logging in, you will be asked to change your password, so please set an appropriate password. --- ## Part 2: Upgrade Procedure The procedure for upgrading Pleasanter is as follows. 1. Stop Pleasanter 2. Pull the GitHub repository 1. Check whether the remote repository on GitHub has been updated 2. Back up modifications such as ".env" and "docker-compose.yml" 3. Check that the backed up data is saved in Git 4. Download the upgrade details 5. Restore modifications such as ".env" and "docker-compose.yml" backed up in step 2.2. <br/> *If necessary, perform "5-Additional step. How to resolve when "Unmerged paths:" is displayed" 6. Check that there are no updates on the remote repository 7. Check that the backed up information such as ".env" and "docker-compose.yml" has been deleted 3. Build the container image 4. Run CodeDefiner 5. Create and starting a Pleasanter container ### 1. Stopping Pleasanter Execute the following command to stop the Pleasanter container. ```bash docker compose stop ``` ### 2. Pulling the GitHub repository Use the "git pull" command to update your source code files. ***Notes** If you performed the initial setup according to "Part 1: Setup Procedure" of this manual, Docker-related files such as ".env" and "docker-compose.yml" have been modified locally. In addition, with the Community Edition, you can freely modify other source code within the scope of the license. If you execute the "git pull" command while modifications have been made locally, an error message may be displayed indicating a conflict with the changes in the remote repository. Below is an example of an error message that is displayed when local modifications conflict with modifications in the remote repository and "git pull" cannot be performed. If the following error message is displayed, none of the modifications in the remote repository have been reflected in the local files after "git pull" is executed. (Even non-conflicting parts are not reflected locally.) ```bash >git pull Updating {{OldID}}..{{NewID}} error: Your local changes to the following files would be overwritten by merge: Implem.Pleasanter/App_Data/Parameters/Rds.json Please commit your changes or stash them before you merge. Aborting ``` As a countermeasure, use a Git command to back up the modification information in advance. *Note that if there are no conflicts between the local modifications and the modifications in the remote repository, the "git pull" command will execute without any problems. You will not know whether "git pull" will result in an error until you run it. Below is a common upgrade procedure that can be performed regardless of whether there are conflicts in the source files or not. There are more steps compared to running only the "git pull" command without any prior preparation, but since there are additional points to check the situation, you can be sure to prevent work errors when upgrading. #### 1. Check whether the GitHub remote repository has been updated Execute the following command. ```bash git fetch git log origin/main ``` When you execute the "git fetch" command, the local files are not updated; only the update information is obtained from the remote repository. If the following log is displayed when you execute the "git log origin/main" command ("**HEAD -> main**" is not at the top of the Git log), there is update information that has not yet been imported locally. ```bash >git log origin/main commit {{ID}} (tag: Pleasanter_1.4.99.1, origin/main, origin/HEAD) Author: Commiter Hayato <{{email address}}> Date: Mon Dec 02 10:00:00 2024 +0900 ## Bug fixed commit {{ID}} (HEAD -> main, tag: Pleasanter_1.4.99.0) Author: Commiter Hayato <{{email address}}> Date: Sun Dec 01 10:00:00 2024 +0900 ## Added new features / Bug fixed ~~The rest is omitted~~ : ``` After checking the results of the "git log origin/main" command, press the "Q" key on your keyboard to exit the Git log checking mode. Then, proceed to step 2.2 onwards. Note that if "**HEAD -> main**" is at the beginning of the Git log, there is no need to upgrade Pleasanter. #### 2. Save modifications to ".env", "docker-compose.yml", etc. Execute the following command. You can add a message surrounded by double quotes and add any comment. ```bash git stash push -m "Saved information before upgrading to 1.x.x.x" ``` After executing the "git stash push" command, the modifications to the local file will be stashed by Git and changed to the contents before the modifications. #### 3. Confirm that the stashed data is saved in Git Execute the following command. ```bash git stash list ``` After executing the "git stash list" command, information such as "stash@{0}: ..." will be displayed in the log, confirming that the changes have been saved. ```bash >git stash list stash@{0}: On main: Backup information before upgrading to 1.x.x.x ``` #### 4. Download the upgrade contents Execute the following command. ```bash git pull ``` After executing the "git pull" command, the local files will be updated to the contents of the next version. #### 5. Restore the modifications to ".env", "docker-compose.yml", etc. that were backed up in step 2.2. Execute the following command. ```bash git stash pop ``` ***Note** If after executing the "git stash pop" command, a log like the one below appears following "**Unmerged paths:**", a "conflict" occurred when updating the file. **Please refer to "5-Additional Steps. How to resolve when "Unmerged paths:" is displayed" below to resolve the "conflict". ** ```bash >git stash pop ~~Omitted~~ Unmerged paths: (use "git restore --staged <file>..." to unstage) (use "git add <file>..." to mark resolution) both modified: Implem.Pleasanter/App_Data/Parameters/Rds.json ``` After executing the "git stash pop" command, various logs other than "Unmerged paths:" will be displayed. There is no problem if logs other than "Unmerged paths:" like the one below are displayed. ```bash >git stash pop On branch main Your branch is up to date with 'origin/main'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git restore <file>..." to discard changes in working directory) modified: Implem.CodeDefiner/Dockerfile modified: Implem.Pleasanter/App_Data/Parameters/Rds.json modified: Implem.Pleasanter/Dockerfile modified: docker-compose.yml Untracked files: (use "git add <file>..." to include in what will be committed) .env no changes added to commit (use "git add" and/or "git commit -a") Dropped refs/stash@{0} ({{The ID is shown here}}) ``` If you think you may have overlooked "Unmerged paths:" and would like to check again, run the "git status" command as shown below. ```bash git status ``` #### 5-Additional Steps. How to resolve when "Unmerged paths:" is displayed If "Unmerged paths:" is not displayed after executing the "git pop stash" command or the "git status" command, there is no need to perform this procedure. The steps to resolve conflicts in source file modifications are as follows. <details> <summary> (Click here to open/close details) </summary> 1. Check the files that need to be resolved 2. Back up the conflicting files 3. Fix the conflicting files with Git commands <br/> ・(Resolution method a.) Reflect the local modifications <br/> ・(Resolution method b.) Reflect the modifications in the remote repository 4. Recover Git information **1. Check the files that need to be resolved** Copy the paths of all files displayed after "Unmerged paths:". Save them to a text editor or similar to transcribe them into the command in step 2.5-Additional Step.3 described later. ```txt Unmerged paths: (use "git restore --staged <file>..." to unstage) (use "git add <file>..." to mark resolution) both modified: Implem.Pleasanter/App_Data/Parameters/Rds.json ``` If the above log is displayed, save the string "Implem.Pleasanter/App_Data/Parameters/Rds.json" to a text editor or similar. **2. Back up conflicting files** Back up all actual files for the paths confirmed in step 2.5-Additional step.1 to another location (outside the Implem.Pleasanter directory). Open the files in the backup location and confirm that the conflict details as shown below have been written by Git. (Color-coded for easy identification.) ![image](https://pleasanter.org/binaries/d983793686ad4bcaabc625e0ed89cd18) **3. Fix conflicting files with Git commands** For all files, select one of the resolution methods shown below and run the command. ・(Solution a.) Reflect local modifications ・(Solution b.) Reflect modifications in the remote repository Continue to run the command in the Implem.Pleasanter directory. **(Solution a.) Reflect local modifications** Execute the following command. ``` git checkout --theirs Implem.Pleasanter/App_Data/Parameters/Rds.json ``` Write "git checkout --theirs" followed by the name of the file that needs to be resolved. After executing the command, Git will modify "Implem.Pleasanter/App_Data/Parameters/Rds.json" as shown below. ![image](https://pleasanter.org/binaries/09026657f3a646809e1dc01e2c1c6435) The "MySQL" setting for "Dbms" that was modified locally before the upgrade will continue to be set after the upgrade. The new "Dbms" default value "NewDefaultDbms" resulting from the upgrade of Pleasanter will be canceled. **(Resolution b.) Reflect the modifications in the remote repository** Execute the following command. ``` git checkout --ours Implem.Pleasanter/App_Data/Parameters/Rds.json ``` After executing the command, Git will modify "Implem.Pleasanter/App_Data/Parameters/Rds.json" as shown below. ![image](https://pleasanter.org/binaries/592de3af786349458522e6cd8c9fe842) The new "Dbms" default value "NewDefaultDbms" will be overwritten due to the Pleasanter version upgrade. The "Dbms" setting value "MySQL" that was modified locally before the version upgrade will be canceled. **4. Recover Git information** Perform the following steps to fix the Git inconsistencies caused by the conflict. Execute the "git add ." command to register in Git that all file conflicts have been resolved. ```bash git add . ``` Because the source changes have been staged, you need to undo the stage and return to the state before step 2.1. Run the "git reset HEAD" command to undo the stage. ```bash git reset HEAD ``` As in step 2.3, run the "git stash list" command. Because a conflict occurred, the revision information saved in step 2 was not automatically deleted. ```bash >git stash list stash@{0}: On main: Saved information before upgrading to 1.x.x.x ``` Run the "git stash drop" command to manually delete the revision information saved in step 2.2. ```bash git stash drop ``` The conflict that occurred when modifying the source file has been resolved. Please continue with steps 2.6. and onwards. </details> #### 6. Confirm that there are no updates on the remote repository After re-executing the "git pull" command, you can finally confirm that the consistency of the Git information is maintained by checking that "Already up to date." is displayed. Execute the following command. ```bash git pull ``` If the following log is displayed after executing the "git pull" command, the Prezenter version upgrade has been reflected in the local file without any problems. ```bash >git pull Already up to date. ``` If the following log is displayed after executing the "git pull" command, a "conflict" occurred when updating the file in step 2.5. (The message detecting the conflict in step 2.5. is easily confused with other messages, so it may have been overlooked.) **Please refer to the above "5-Additional Steps. How to resolve when "Unmerged paths:" is displayed" to resolve the "conflict."** ```bash >git pull error: Pulling is not possible because you have unmerged files. hint: Fix them up in the work tree, and then use 'git add/rm <file>' hint: as appropriate to mark resolution and make a commit. fatal: Exiting because of an unresolved conflict. ``` #### 7. Confirm the deletion of backed up information such as ".env", "docker-compose.yml", etc. Execute the following command. ``` git stash list ``` The change information confirmed in step 2.3 (such as "stash@{0}: ...") is automatically deleted when restoring with "git stash pop" (or was manually deleted with the "git stash drop" command), so nothing is displayed. This completes the pull of the GitHub repository. ### 3. Building the container image Execute the following command. ``` docker compose build ``` ### 4. Run CodeDefiner Execute the following command. ```bash docker compose run --rm codedefiner _rds ``` If you see the message "Type "y" (yes) if the license is correct, otherwise type "n" (no)" during the process, enter **y**. ### 5. Create and start the Pleasanter container 1. Run 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 started. ``` docker compose up -d pleasanter ``` 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. --- ## Part 3 Stopping and Deleting Containers Use the following command to stop a container. ```bash docker compose stop ``` To restart a stopped container, run the following command. ```bash docker compose start ``` DB data will not be deleted even if the container is stopped. When restarting, the data will be available as is. --- Use the following command to delete a container. DB data (volumes) will not be deleted even if the container is deleted. ```bash docker compose down ``` Note that if a container is deleted, it cannot be restarted. If you want to start it, create a container. Run the following command. This will also create a DB container and the remaining DB data will be available as is. ```bash docker compose up -d pleasanter ``` If you want to delete data (volumes) at the same time as deleting a container, run it with the option to delete the volume. ```bash docker compose down -v ``` ## Related Information <div id="ManualList"><ul><li><a href="/en/manual/rds-json">Set Parameter: Rds.json</a><span>10.24.2024 up</span></li> <li><a href="/en/manual/service-json">Set Parameter: Service.json</a><span>10.10.2024 up</span></li></ul></article></div><input id="SearchTextHidden" type="hidden" value="" />
TOP
このページをシェアする
記載された商品名、各製品名は各社の登録商標または商標です。 © Implem Inc.