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:
$ 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_stableEnvironment variables
Section titled “Environment variables”JAVA_OPTS - Java system properties, defaults to -Dloader.path=lib
Plugins
Section titled “Plugins”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.
-
First, create a new
Dockerfile-pluginswhich 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 baseFROM erudikaltd/para-dao-sql:${SQL_DAO_VERSION} AS daoFROM erudikaltd/para-search-lucene:${SEARCH_VERSION} AS searchFROM base AS finalCOPY --from=dao /para/lib/*.jar /para/libCOPY --from=search /para/lib/*.jar /para/lib# EXAMPLE: Add a PostgreSQL JDBC DriverARG PG_JDBC_VERSION="0.0.0"ADD https://jdbc.postgresql.org/download/postgresql-${PG_JDBC_VERSION}.jar /para/lib/ -
Then, create a
docker-compose.ymlfile:Example: docker-compose.yml
docker-compose.yml services:para:depends_on:- dbbuild:context: .dockerfile: Dockerfileargs:PARA_VERSION: "1.51.0"SQL_DAO_VERSION: "1.49.1"PG_JDBC_VERSION: "42.7.7"image: para-with-pluginspull_policy: neverports:- "8080:8080"volumes:- type: volumesource: paraDatatarget: /para/data- type: volumesource: paraLibtarget: /para/lib- type: bindsource: ./para-application.conftarget: /para/para-application.confrestart: alwaysenvironment:- JAVA_OPTS=-Dconfig.file=/para/para-application.conf -Dloader.path=/para/libdb:image: postgres:latestports:- "5432:5432"volumes:- type: volumesource: postgresDatatarget: /var/lib/postgresql/datarestart: alwaysenvironment:- POSTGRES_PASSWORD=mysecretpassword- PGDATA=/var/lib/postgresql/datavolumes:paraData:paraLib:postgresData: -
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" -
Finally, run
docker compose build para && docker compose up.
Kubernetes
Section titled “Kubernetes”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:
cd helm; helm install para ./paraFor more info, check the quick start guide at helm/README.md.