Petriflow workflow engine. Runs process-driven apps as a REST service.
8.3K
Open-source workflow engine that runs Petriflow process models on the JVM. The image is a ready-to-run Spring Boot 3.5 service (Java 21 JRE) exposing a REST API, so you only supply the data services it talks to: MongoDB, Elasticsearch and Redis.
10001:10001 on port 8080| Service | Version | Purpose | Port |
|---|---|---|---|
| MongoDB | 8+, configured as a replica set | Primary document store | 27017 |
| Elasticsearch | 8+ | Full-text search and filtering | 9200 / 9300 |
| Redis | 8+ | Session store and caching | 6379 |
| MinIO | optional | File and object storage | 9000 |
MongoDB must run as a replica set (a single-node rs0 is enough) because the engine uses transactions.
Start the required services first. This compose file starts MongoDB with an rs0 replica set, Elasticsearch,
Redis and the engine:
services:
mongodb:
image: mongo:8.0
command: [ "--replSet", "rs0", "--bind_ip_all" ]
healthcheck:
test: [ "CMD-SHELL", "mongosh --quiet --eval \"try { rs.status() } catch (e) { rs.initiate({_id:'rs0',members:[{_id:0,host:'127.0.0.1:27017'}]}) }\"" ]
interval: 10s
timeout: 30s
retries: 20
volumes:
- mongo_data:/data/db
elasticsearch:
image: elasticsearch:8.19.15
environment:
discovery.type: single-node
xpack.security.enabled: "false"
ES_JAVA_OPTS: -Xms512m -Xmx512m
volumes:
- es_data:/usr/share/elasticsearch/data
redis:
image: redis:8
engine:
image: netgrif/application-engine:latest
ports:
- "8080:8080"
environment:
NETGRIF_ENGINE_DATA_MONGODB_URI: mongodb://mongodb:27017
NETGRIF_ENGINE_DATA_ELASTIC_URL: elasticsearch
NETGRIF_ENGINE_DATA_REDIS_HOST: redis
NETGRIF_ENGINE_SECURITY_AUTH_ADMIN_PASSWORD: change-me
NETGRIF_ENGINE_SECURITY_ENCRYPTION_PASSWORD: change-me-too
volumes:
- nae_storage:/opt/netgrif/engine/storage
- nae_log:/opt/netgrif/engine/log
depends_on:
mongodb:
condition: service_healthy
elasticsearch:
condition: service_started
redis:
condition: service_started
volumes:
mongo_data:
es_data:
nae_storage:
nae_log:
docker compose up -d
The engine listens on http://localhost:8080 and reports health at http://localhost:8080/manage/health.
On first start the image creates a super user:
admin[email protected]NETGRIF_ENGINE_SECURITY_AUTH_ADMIN_PASSWORD; if you don't set it, a random password is
generated and printed in the startup log.To reuse an existing MongoDB, Elasticsearch or Redis instead, run the engine alone:
docker run -d --name nae -p 8080:8080 \
-e NETGRIF_ENGINE_DATA_MONGODB_URI=mongodb://host.docker.internal:27017 \
-e NETGRIF_ENGINE_DATA_ELASTIC_URL=host.docker.internal \
-e NETGRIF_ENGINE_DATA_REDIS_HOST=host.docker.internal \
-e NETGRIF_ENGINE_SECURITY_AUTH_ADMIN_PASSWORD=change-me \
netgrif/application-engine:latest
All settings are Spring properties and can be passed as environment variables:
| Property | Environment variable | Default |
|---|---|---|
netgrif.engine.data.mongodb.uri | NETGRIF_ENGINE_DATA_MONGODB_URI | mongodb://localhost:27017 |
netgrif.engine.data.database-name | NETGRIF_ENGINE_DATA_DATABASE_NAME | nae |
netgrif.engine.data.elasticsearch.url | NETGRIF_ENGINE_DATA_ELASTIC_URL | localhost |
netgrif.engine.data.elasticsearch.searchPort | NETGRIF_ENGINE_DATA_ELASTIC_SEARCH_PORT | 9200 |
netgrif.engine.data.redis.host | NETGRIF_ENGINE_DATA_REDIS_HOST | localhost |
netgrif.engine.data.redis.port | NETGRIF_ENGINE_DATA_REDIS_PORT | 6379 |
netgrif.engine.storage.default-type | NETGRIF_ENGINE_STORAGE_DEFAULT_TYPE | local |
netgrif.engine.security.auth.admin-password | NETGRIF_ENGINE_SECURITY_AUTH_ADMIN_PASSWORD | (random, logged once) |
netgrif.engine.security.auth.open-registration | NETGRIF_ENGINE_SECURITY_AUTH_OPEN_REGISTRATION | true |
netgrif.engine.mail.host | NETGRIF_ENGINE_MAIL_HOST | (empty, mail disabled) |
netgrif.engine.server.port | — | 8080 |
JVM options go through JAVA_TOOL_OPTIONS. The full reference is at
https://platform.netgrif.cloud/refs/config/engine-standalone-config.
| Item | Value |
|---|---|
| HTTP port | 8080 |
| Management endpoints | /manage (health, metrics, prometheus, loggers) |
| REST API | /api |
| User | 10001:10001, non-root |
| Writable paths | /opt/netgrif/engine/storage, /opt/netgrif/engine/log, /opt/netgrif/engine/modules |
| Process models | /opt/netgrif/engine/src/main/resources/petriNets and through the REST API |
| Stop signal | SIGTERM |
A named Docker volume inherits the ownership of the image directory and works without extra setup. For bind mounts,
set the owner to 10001:10001.
OpenAPI documentation is disabled by default. Set NETGRIF_ENGINE_SWAGGER_ENABLED=true to publish /v3/api-docs
and /swagger-ui.html.
NETGRIF_ENGINE_SECURITY_AUTH_ADMIN_PASSWORD and NETGRIF_ENGINE_SECURITY_ENCRYPTION_PASSWORD before the first
start. The encryption password protects stored values, so changing it later invalidates existing data.private.der, public.crt under src/main/resources/certificates) with your own
before exposing the engine to a network, or set NETGRIF_ENGINE_SECURITY_JWT_PRIVATE_KEY.NETGRIF_ENGINE_SECURITY_AUTH_OPEN_REGISTRATION=false if users must not register themselves.NETGRIF Community License 2.0: free for development, testing, evaluation, education, and other non-production use. Production use requires a commercial license from NETGRIF, s.r.o. See netgrif.com/license.
docker pull netgrif/application-engine:latest