Skip to content

Getting Started with Docker

Note for users who want to use the Docker edition of Pleasanter in production

The steps in this manual are simplified for users who want to try Pleasanter right away. If you plan to use the Docker edition of Pleasanter in production, we strongly recommend setting it up using the official procedure.

Overview

This section explains how to get started with Pleasanter on Docker right away, using the configuration values below.

No Setting Parameter Value Notes
1 PostgreSQL version POSTGRES_VERSION 17
2 Password for the PostgreSQL admin user POSTGRES_PASSWORD SetSaPWD
3 Password for the Sa connection string Implem_Pleasanter_Rds_PostgreSQL
PWD in SaConnectionString
SetSaPWD Set the same value as No. 2
4 Password for the Owner connection string Implem_Pleasanter_Rds_PostgreSQL
PWD in OwnerConnectionString
SetAdminsPWD
5 Password for the User connection string Implem_Pleasanter_Rds_PostgreSQL
PWD in UserConnectionString
SetUsersPWD
6 Pleasanter version PLEASANTER_VERSION latest Retrieves the latest version at the time of use
7 Pleasanter language CodeDefiner's /l option "ja"
8 Pleasanter time zone CodeDefiner's /z option "Asia/Tokyo"

Steps

Here is an overview of the steps.

  1. Prepare a Docker runtime environment
  2. Create and move into a project directory
  3. Create the files
  4. Run CodeDefiner
  5. Start and stop Pleasanter

1. Prepare a Docker runtime environment

Prepare a Docker runtime environment (such as Docker Engine or Docker Desktop) appropriate for the OS you're using.

See the official Docker documentation to prepare a Docker runtime environment

For details, see the official Docker documentation below.

2. Create and move into a project directory

Run the following commands to create a project directory in a location of your choice, and move into it.

mkdir ./pleasanter
cd ./pleasanter

You can change the name of the project directory

The commands above use pleasanter as the project directory name, but you can change it to something else if you like.

3. Create the files

Create two files, .env and compose.yaml, inside the project directory.

type nul > .env
type nul > compose.yaml
New-Item .env -ItemType File -Force
New-Item compose.yaml -ItemType File -Force
touch .env
touch compose.yaml

.env

Open .env in a text editor, paste the content below, and save it.

pleasanter/.env
POSTGRES_VERSION=17
POSTGRES_VOLUMES_TARGET=/var/lib/postgresql/data
POSTGRES_USER=postgres
POSTGRES_PASSWORD=SetSaPWD
POSTGRES_DB=postgres
POSTGRES_HOST_AUTH_METHOD=scram-sha-256
POSTGRES_INITDB_ARGS="--auth-host=scram-sha-256"
PLEASANTER_VERSION=latest
Implem_Pleasanter_Rds_PostgreSQL_SaConnectionString="Server=db;Database=postgres;UID=postgres;PWD=SetSaPWD"
Implem_Pleasanter_Rds_PostgreSQL_OwnerConnectionString="Server=db;Database=#ServiceName#;UID=#ServiceName#_Owner;PWD=SetAdminsPWD"
Implem_Pleasanter_Rds_PostgreSQL_UserConnectionString="Server=db;Database=#ServiceName#;UID=#ServiceName#_User;PWD=SetUsersPWD"

compose.yaml

Open compose.yaml in a text editor, paste the content below, and save it.

pleasanter/compose.yml
services:
    db:
    container_name: postgres
    image: postgres:${POSTGRES_VERSION}
    environment:
        - POSTGRES_USER
        - POSTGRES_PASSWORD
        - POSTGRES_DB
        - POSTGRES_HOST_AUTH_METHOD
        - POSTGRES_INITDB_ARGS
    volumes:
        - type: volume
        source: pg_data
        target: ${POSTGRES_VOLUMES_TARGET}
    pleasanter:
    container_name: pleasanter
    image: implem/pleasanter:${PLEASANTER_VERSION}
    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:
    container_name: codedefiner
    image: implem/pleasanter: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

4. Run CodeDefiner

In the project directory, run CodeDefiner with the following command.

docker compose run --rm codedefiner _rds /y /l "ja" /z "Asia/Tokyo"

5. Starting and stopping Pleasanter

Start Pleasanter

  1. In the project directory, run the following command to start Pleasanter.
    docker compose up -d pleasanter
  1. Open http://localhost:50001 in your web browser.
  2. When the login screen appears, enter the following information.

    Login ID Initial Password
    Administrator pleasanter

    Login screen for entering the login ID and initial password

  3. Change the password to a secure one.

    Screen for changing the password

Stop Pleasanter

  1. Close your web browser.
  2. In the project directory, stop the containers.
    docker compose stop

Start Pleasanter again

  1. In the project directory, start the containers.
    docker compose start
  1. Open http://localhost:50001 in your web browser.