Skip to main content
Skip table of contents

Community Edition Installation Guide

This guide will walk you through the process of setting up the PIES Studio application development platform on your local machine, enabling you to create and manage applications without writing a single line of code.

This platform is still under active development, and some features may not work as expected. If you have any suggestions or queries, please reach out to us at info@pies.io.

System Requirements

Following are the minimum and recommended hardware and software requirements to set up a community edition instance on a development machine.

Minimum Hardware Requirements -

  1. CPU – x64 2+GHz CPU

  2. RAM – 16 GB

  3. Hard Disk Space (SSD) – 5 GB*

Recommended Hardware Requirements

  1. CPU – x64 2.5+GHz CPU

  2. RAM – 32 GB

  3. Hard Disk Space (SSD) – 10 GB*

*Required hard disk space may vary depending on the size and number of applications developed.
*CPU configuration has been tested on 3rd Generation Intel® Xeon® Standard_DsV3 virtual machines with HyperThreading enabled.

Prerequisites

Before getting started, ensure you have the following prerequisites installed on your system:

  1. Docker Engine - Install Docker

  2. Docker Compose - Install Docker Compose

Or you can install Docker Desktop, which installs all the above mentioned components.

Registration

Before setting up PIES Studio, please register for an account at https://admin.pies.studio. Once registered, you will receive instructions to set your password via email.

After setting up your password, login and activate your community license which should generate a unique Client ID and Client Secret for you.

Please note that the client secret is only visible for the current session and will be masked after refreshing the page or closing the session. If you forget the client secret, you can re-generate it from the registration portal.

The ‘Client ID’ and ‘Client Secret’ values are unique for every registration and should be kept private at all times. Please make sure you do not share your Client ID and Client Secret, or use them on public machines.

Community Edition Setup

The Easy Way (Recommended)

You can easily set-up and start using the PIES Studio community edition using the docker compose file shown below.

Step 1: Download Docker Compose File

Download the following docker compose file on your local machine and save it as docker-compose.yml -

DOCKER
# This is the official docker compose file for running the PIES Studio platform's community edition on a local development machine.
# This file is just a template, depending on your machine setup and the depdency setup, you can make desired changes to the contents of the file.
#
# This file assumes the default set-up configuration expected by the paltform, if you have customized the configuration (Example - If you run any containers on different ports),
# please replace the <YOUR_...> placeholders with your actual configuration values. 

# This Docker Compose file defines all the necessary services for PIES Studio, including Redis and MySQL containers. The dependencies between services ensure that they start in the correct order and can communicate with each other.

version: '3.8'
name: 'pies_studio_community_edition'
services:
  # The PIES Studio portal & editor
  pies_studio_web:
    image: piesio/pies_studio_web:latest
    ports:
      - "4200:80"
  # The PIES Studio backend server
  pies_studio_core:
    image: piesio/pies_studio_core:latest
    ports:
      - "8080:8080"
      - "9081:9081"
    environment:
      - PIES_CLIENT_ID=<YOUR_CLIENT_ID>
      - PIES_CLIENT_SECRET=<YOUR_CLIENT_SECRET>
      # - PIES_WEB_URL=<YOUR_WEB_URL>
      # - PIES_PREVIEW_CLIENT_URL=<YOUR_PREVIEW_CLIENT_URL>
      # - PIES_PREVIEW_SERVER_URL=<YOUR_PREVIEW_SERVER_URL>
  # The PIES Studio preview engine client
  pies_engine_web:
    image: piesio/pies_engine_web:latest
    ports:
      - "4100:80"
  # The PIES Studio preview engine server
  pies_engine:
    image: piesio/pies_engine:latest
    pull_policy: missing
    ports:
      - "9090:9090"
    environment:
      # - REDIS_HOST_URL=<YOUR_REDIS_HOST_URL>
      # - REDIS_HOST_PASSWORD=<YOUR_REDIS_PASSWORD>
      # - PREVIEW_UI_URL=<YOUR_PREVIEW_UI_URL>
      # - PREIVEW_BACKEND_URL=<YOUR_PREVIEW_BACKEND_URL>
      # - PIES_BACKEND_URL=<YOUR_PIES_BACKEND_URL>
      # - PREVIEW_DB_HOST=<YOUR_MYSQL_DB_HOST>
      - MODE=listen
      - DOCKER_HOST=tcp://docker:2376
      - DOCKER_CERT_PATH=/certs/client/
      - DOCKER_TLS_VERIFY=enable
      - PREVIEW_DB_NAME=pies_preview_db
      - PREVIEW_DB_USERNAME=root
      - PREVIEW_DB_PASSWORD=ajsfa8osfy90a8 # Replace with <YOUR_MYSQL_DB_PASSWORD>
    privileged: true
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock # For windows set-ups you might need //var/run/docker.sock:/var/run/docker.sock
      - generated:/loki/generated
      - certs:/certs
    depends_on:
      - redis
      - mysql

  docker:
    image: piesio/pies_engine_dind:latest
    environment:
      - DOCKER_TLS_CERTDIR=/certs/
      - DOCKER_TLS_VERIFY=enable
      - MODE=proxy
    ports:
      - "9010:9010"
      - "9020:9020"
    volumes:
      - certs:/certs
      - generated:/loki/generated
    privileged: true

  redis:
    image: redis
    ports:
      - "6379:6379"

  mysql:
    image: mysql:8.0
    ports:
      - "3306:3306"
    environment:
      - MYSQL_ROOT_PASSWORD=ajsfa8osfy90a8 # Replace with <YOUR_MYSQL_DB_PASSWORD>
      - MYSQL_DATABASE=pies_preview_db

volumes:
  generated:
    name: generated
  certs:
    name: certs

Step 2: Set the Client ID and Client Secret

Replace the client id and client secret values with the ones obtained from the registration step on line numbers 24 and 25.

Step 3: Run the docker compose file

Launch a terminal at the location where you saved the docker compose file, and run the following command.

BASH
docker-compose up -d

This command will download the necessary Docker images and start all PIES Studio components seamlessly.

Step 4: Start using the platform

Navigate to http://localhost:4200 in your browser and log in using your credentials to start using the platform.

Cleanup

Run the following command from the docker compose file root directory to stop the containers are clean-up any used volumes once you are done.

CODE
docker compose down -v

The Hard Way (Not Recommended)

You can also download, configure and run each image manually in order to start the PIES Studio community edition on your machine.

Configuring and running all the images manually can be error prone and may lead to problems during the set-up process.

It is recommended to go with the docker compose approach for an easy and hassle-free installation.

The PIES Studio community edition container images are available on hub.docker.com A PIES Studio community edition instance consists of 5 major images –

PIES Studio Web Image

The PIES Studio web runtime provides a user-friendly web portal consisting of the platform and the application editor

  • Container Port: 80

  • Host Port: 4200 (Recommended)

Use the following command to run the PIES Studio Web client image on your machine -

BASH
docker run -d -p 4200:80 piesio/pies_studio_web:latest

PIES Studio Server Image

The PIES Studio server constitutes the backend server for the development platform. This combines a REST API and a WebSocket server in a single image, and runs on the following ports -

  • Container Port: 8080

  • Host Port: 8080 (Recommended)

Environment Variables:

  • PIES_CLIENT_ID (Mandatory)
    The client id value obtained from the license management server at https://admin.pies.studio

  • PIES_CLIENT_SECRET (Mandatory)
    The client secret value obtained from the license management server at https://admin.pies.studio

  • PIES_WEB_URL (Optional)
    The web client URL for CORS configuration. Default value - http://localhost:4200

  • PIES_PREVIEW_CLIENT_URL (Optional)
    The application preview web client URL for CORS configuration. Default value - http://localhost:4100

  • PIES_PREVIEW_SERVER_URL (Optional)
    The application preview server URL. Default value - http://localhost:9090

Use the following command to run the PIES Studio Web client image on your machine -

BASH
docker run -d -p 8080:8080 -e PIES_CLIENT_ID=<YOUR_CLIENT_ID> \ 
-e PIES_CLIENT_SECRET=<YOUR_CLIENT_SECRET> piesio/pies_studio_core:latest

You can use any other port instead of 4200, just replace the port number in the above command with the desired port number.

PIES Studio Preview Server Runtime

The PIES Studio preview server constitutes the backend server for the application preview generation. This consists of two image pies_engine and pies_engine_dind.

This combines a REST API and a WebSocket server, and runs on the following ports -

  • Container Ports: 9090

  • Host Ports: 9090 (Recommended)

Dependencies
  • Redis - A remote or a running local instance of the redis-server is required

  • MySQL - A remote or local MySQL database instance is required to import the application data model during preview

Environment Variables - (Optional)

  • REDIS_HOST_URL
    The redis-server host URL. Default value - http://localhost:6379

  • REDIS_HOST_PASSWORD
    The redis-server host password. Default value - Empty string ''.

  • PREVIEW_UI_URL
    The url for the frontend proxy server for the previewed application. The port number in this value should be adjusted as per the host port mapped to 9010. Default value - http://localhost:9010

  • PREIVEW_BACKEND_URL
    The url for the backend proxy server for the previewed application. The port number in this value should be adjusted as per the host port mapped to 9020. Default value - http://localhost:9020

  • PIES_BACKEND_URL
    The pies studio backend server url. The port number in this value should be adjusted as per the host port mapped to 8080 for the PIES Studio backend server container.Default value - http://localhost:8080

  • PREVIEW_DB_HOST
    The MySQL database host url. Default value - http://localhost:3306

  • PREVIEW_DB_NAME
    The MySQL database name to use for the application preview. Default value - pies_preview_db

  • PREVIEW_DB_USERNAME
    The MySQL database username. Default value - root

  • PREVIEW_DB_PASSWORD
    The MySQL database password. Default value - empty string ''

Use the following command to run the PIES Studio Preview server image on your machine -

CODE
docker run -d -p 9090:9090 -p 9010:9010 -p 9020:9020 \
-e DOCKER_HOST=tcp://host.docker.interal:2376 \
-e DOCKER_CERT_PATH=/certs/client/ \
-e DOCKER_TLS_VERIFY=enable \
-e REDIS_HOST_URL=<YOUR_REDIS_HOST_URL> \
-e REDIS_HOST_PASSWORD=<YOUR_REDIS_PASSWORD> \
-e PREVIEW_UI_URL=<YOUR_UI_URL> \
-e PREIVEW_BACKEND_URL=<YOUR_BACKEND_URL> \
-e PIES_BACKEND_URL=<YOUR_PIES_BACKEND_URL> \
-e PREVIEW_DB_HOST=<YOUR_DB_HOST> \
-e PREVIEW_DB_NAME=<YOUR_DB_NAME> \
-e PREVIEW_DB_USERNAME=<YOUR_DB_USERNAME> \
-e PREVIEW_DB_PASSWORD=<YOUR_DB_PASSWORD> \
--privileged \
-v /var/run/docker.sock:/var/run/docker.sock \
piesio/pies_engine:latest

PIES Studio Preview Docker Runtime

The PIES Studio docker runtime provides the docker-in-docker runtime for the application preview generation. It also consists of a proxy server used to preview the applications.

It runs on the following ports -

  • Container Ports: 9010, 9020

  • Host Ports: 9010, 9020 (Recommended)

This image requires extended privileges and should be run in privileged mode

Environment Variables -

  • DOCKER_TLS_CERTDIR
    The directory used to store the docker CA certificates. This should be set to /certs/

  • DOCKER_TLS_VERIFY
    The environment variable to specify that TLS verification should be enabled

  • MODE
    The mode in which the server should be run. This should always be set proxy.

Use the following command to run the PIES Studio Preview server image on your machine -

CODE
docker run -d -p 9010:9010 -p 9020:9020 \
-e DOCKER_TLS_CERTDIR=/certs/ \
-e DOCKER_TLS_VERIFY=enable \
-e MODE=proxy \
--privileged \
piesio/pies_engine_dind:latest

This image is not a standalone image and should always be used in conjunction with the preview server image

PIES Studio Preview Client Image

The PIES Studio Preview client enables real-time application previews. It runs on the following ports -

  • Container Port: 80

  • Host Port: 4100 (Recommended)

Use the following command to run the PIES Studio Web client image on your machine -

BASH
docker run -d -p 4100:80 piesio/pies_engine_web:latest
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.