Skip to content

Docker & Kubernetes

Tagged Docker images for Para are located at erudikaltd/para on Docker Hub. It’s highly recommended that you pull only release images like :1.51.0 or :latest_stable because the :latest tag can be broken or unstable. First, create an para-application.conf file and a data folder and start the Para container:

Terminal window
$ touch para-application.conf && mkdir data
$ docker run -ti -p 8080:8080 --rm -v $(pwd)/data:/para/data \
-v $(pwd)/para-application.conf:/para/para-application.conf \
-e JAVA_OPTS="-Dconfig.file=/para/para-application.conf" erudikaltd/para:latest_stable

JAVA_OPTS - Java system properties, defaults to -Dloader.path=lib

You can create a custom Para container with all plugins and JDBC drivers you need by using docker compose. Below is an example build of Para, using para-dao-sql, para-search-lucene and PosgreSQL as a database.

  1. First, create a new Dockerfile-plugins which does a multi-stage build like so:

    Dockerfile-plugins
    ARG PARA_VERSION="0.0.0"
    ARG SQL_DAO_VERSION="0.0.0"
    FROM erudikaltd/para:v${PARA_VERSION} AS base
    FROM erudikaltd/para-dao-sql:${SQL_DAO_VERSION} AS dao
    FROM erudikaltd/para-search-lucene:${SEARCH_VERSION} AS search
    FROM base AS final
    COPY --from=dao /para/lib/*.jar /para/lib
    COPY --from=search /para/lib/*.jar /para/lib
    # EXAMPLE: Add a PostgreSQL JDBC Driver
    ARG PG_JDBC_VERSION="0.0.0"
    ADD https://jdbc.postgresql.org/download/postgresql-${PG_JDBC_VERSION}.jar /para/lib/
  2. Then, create a docker-compose.yml file:

    Example: docker-compose.yml
    docker-compose.yml
    services:
    para:
    depends_on:
    - db
    build:
    context: .
    dockerfile: Dockerfile
    args:
    PARA_VERSION: "1.51.0"
    SQL_DAO_VERSION: "1.49.1"
    PG_JDBC_VERSION: "42.7.7"
    image: para-with-plugins
    pull_policy: never
    ports:
    - "8080:8080"
    volumes:
    - type: volume
    source: paraData
    target: /para/data
    - type: volume
    source: paraLib
    target: /para/lib
    - type: bind
    source: ./para-application.conf
    target: /para/para-application.conf
    restart: always
    environment:
    - JAVA_OPTS=-Dconfig.file=/para/para-application.conf -Dloader.path=/para/lib
    db:
    image: postgres:latest
    ports:
    - "5432:5432"
    volumes:
    - type: volume
    source: postgresData
    target: /var/lib/postgresql/data
    restart: always
    environment:
    - POSTGRES_PASSWORD=mysecretpassword
    - PGDATA=/var/lib/postgresql/data
    volumes:
    paraData:
    paraLib:
    postgresData:
  3. Also create the Para configuration file para-application.conf:

    para-application.conf
    para.env = "production"
    para.dao = "SqlDAO"
    para.sql.driver = "org.postgresql.Driver"
    para.sql.url = "postgresql://db:5432/para"
    para.sql.user = "postgres"
    para.sql.password = "mysecretpassword"
  4. Finally, run docker compose build para && docker compose up.

There’s a Helm chart inside the helm/ folder. First edit helm/para/values.yaml and then you can deploy Para to Kubernetes with a single command:

Terminal window
cd helm; helm install para ./para

For more info, check the quick start guide at helm/README.md.