Skip to main content

Docker compose Local

Caution

Only for testing purposes on your local computer

This page describes how to quickly setup a self-managed instance of Plumber for testing purposes using Docker-compose on your local computer. This is not suitable for production

💻 Requirements

🛠️ Installation

  1. 🦊 Create GitLab Application

    On your GitLab instance, open the Applications page: Your picture > Preferences > Applications (example: gitlab.com)

    Create an application with the following information :

    1. Name: Plumber self-managed
    2. Redirect URI : http://localhost:3001/api/auth/gitlab/callback
    3. Confidential: true (let the box checked)
    4. Scopes: api

    Click on Save Application and you should see the following screen: Application

    Keep this GitLab tab open, the Application ID and Secret will be used in the configuration step

  2. 📥 Setup your environment

    Clone the repository locally

    Terminal window
    git clone https://github.com/getplumber/platform.git plumber-platform
    cd plumber-platform

    Create your configuration file

    Terminal window
    cp .env.local.example .env
  3. 📚 Update the configuration

    Edit the .env file:

    • Copy/paste the Application ID and the Secret from the GitLab application you just created

      .env
      GITLAB_OAUTH2_CLIENT_ID="<application-id>"
      GITLAB_OAUTH2_CLIENT_SECRET="<application-secret>"
    • Replace <your-gitlab-url> by domain of your GitLab server

      .env
      JOBS_GITLAB_URL="https://<your-gitlab-url>"
    • If you want to connect Plumber to a specific GitLab group only: add the path of the group in ORGANIZATION variable (to run the onboarding, you must be at least Maintainer in this group)

      .env
      ORGANIZATION="<group-path>"
    • If you want to connect Plumber to the whole GitLab instance: let the ORGANIZATION variable empty (to run the onboarding, you must be a GitLab instance Admin)

      .env
      ORGANIZATION=""

    Run the following commands to generate random secrets for all components:

    Terminal window
    sed -i."" "s/REPLACE_ME_BY_SECRET_KEY/$(openssl rand -hex 32)/g" .env
    sed -i."" "s/REPLACE_ME_BY_JOBS_DB_PASSWORD/$(openssl rand -hex 16)/g" .env
    sed -i."" "s/REPLACE_ME_BY_JOBS_REDIS_PASSWORD/$(openssl rand -hex 16)/g" .env
  4. 🚀 Launch Plumber!

    Start Plumber

    Terminal window
    docker compose -f compose.local.yml up -d

    Open your Plumber test instance 👉 click here 🎉

⏫ Update Plumber

Follow these steps to update your self-managed instance to a new version:

  1. Navigate to the location of your platform git repository

  2. Update it

    Terminal window
    git pull
  3. Open the .env.local.example file and copy the values of FRONTEND_IMAGE_TAG and BACKEND_IMAGE_TAG variables

  4. Edit the .env file by updating values of FRONTEND_IMAGE_TAG and BACKEND_IMAGE_TAG variables with the values previously copied

    .env
    FRONTEND_IMAGE_TAG="<new frontend version>"
    BACKEND_IMAGE_TAG="<new backend version>"
  5. Restart your containers

    Terminal window
    docker compose -f compose.local.yml up -d
  6. You have successfully updated Plumber on your server 🎉