Skip to content

I want to change the base URL in a Docker environment

Answer

Please change the settings according to the following procedure.


Overview

In a Docker environment, if you install Pleasanter according to the manual procedure Use a Docker Image and Start It by Changing the Parameters from the Default, the URL will be as follows:

http://localhost:50001

However,
http://localhost:50001/nakano

If you want to change it to a "Base URL" with a path like this, please follow the steps below to set it up.

Cautions

  1. If you perform this procedure on a running Pleasanter, attachments, description column, images pasted in comments, and site images (icons) will no longer be displayed. To resolve this, attach or paste again. Please consider carefully before changing the base URL while it is running.

Operation Procedure

To change the base URL, follow the steps below. The following steps use the base URL as an example.

http://localhost:50001/nakano

  1. Dockerfile settings
  2. Setting the parameter file "Service.json"
  3. Building the container image
  4. Starting Pleasanter

*The file paths shown in the following steps are for when you follow the procedure Use a Docker Image and Start It by Changing the Parameters from the Default, so please read them appropriately according to your environment.

1. Set Dockerfile

Add ""--pathBase", "/nakano"" to the ENTRYPOINT for /Pleasanter/Dockerfile as follows.

/Pleasanter/Dockerfile
ENTRYPOINT [ "dotnet", "Implem.Pleasanter.dll" ]
/Pleasanter/Dockerfile
ENTRYPOINT [ "dotnet", "Implem.Pleasanter.dll", "--pathBase", "/nakano" ]

2. Set the parameter file Service.json

Set "AbsoluteUri" in "Service.json" as follows.

    "AbsoluteUri": "http://localhost:50001/nakano"

3. Build the container image

Execute the following command.

docker compose build

4. Start Pleasanter

Create a container and start Pleasanter.

docker compose up -d pleasanter