This will build a container for Formio API Server A form server based on NodeJS.
This Container uses customized Alpine as a base image along with NodeJS 14.
- Introduction
- Authors
- Table of Contents
- Prerequisites
- Installation
- Configuration
- Maintenance
- References
-
This image assumes that you are using a reverse proxy such as jwilder/nginx-proxy and optionally the Let's Encrypt Proxy Companion @ https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion in order to serve your pages. However, it will run just fine on it's own if you map appropriate ports.
-
You must use have an seperate MongoDB container instance setup for storage of data before running this container on its own.
Automated builds of the image are available on Docker Hub and is the recommended method of installation.
docker pull docker.io/tiredofit/formio-api
-
The quickest way to get started is using docker-compose. See the examples folder for a working docker-compose.yml that can be modified for development or production use.
-
Set various environment variables to understand the capabilities of this image.
-
Map persistent storage for access to configuration and data files for backup.
Once started, visit your defined hostname or IP Address and port and login using the values provided in the ROOT_EMAIL
and
ROOT_PASS
variables below.
Parameter | Description |
---|---|
/app/templates |
Drop your exported Form.IO json templates here |
Along with the Environment Variables from the Base image below is the complete list of available options that can be used to customize your installation.
Parameter | Description |
---|---|
PROJECT_TEMPLATE |
The project template to use (leave empty for default template) |
ROOT_EMAIL |
Administrator email for login e.g. [email protected] |
ROOT_PASS |
Password for login e.g. password |
DB_USER |
Optional Database user for MongoDB e.g. formio |
DB_PASS |
Optional Database password for MongoDB e.g. password |
DB_PORT |
MongoDB Port - Default 27017 |
DB_SECRET |
MongoDB Encryption Secret - Default secret |
JWT_SECRET |
JWT Secret - Default secret |
JWT_EXPIRE_TIME |
JWT Expire Time in Seconds - Default 240 |
Parameter | Description |
---|---|
EMAIL_TYPE |
How to send email - Options are sendgrid , mandrill - Default sendgrid |
EMAIL_USER |
Sendgrid Mail Username e.g. [email protected] |
EMAIL_PASS |
Sendgrid Mail password e.g. password |
EMAIL_KEY |
Mandrill API Key |
MAIL_SENDGRID_API_KEY |
(optional) Sendgrid API Key |
GMAIL_USER |
(optional) Gmail Username |
GMAIL_PASS |
(optional) Gmail Password |
MAIL_MANDRILL_API_KEY |
(optional) Mandrill API Key |
SMTP_HOST |
Hostname of SMTP Server |
SMTP_SSL |
Should SSL be used for connection to SMTP TRUE FALSE |
SMTP_USER |
SMTP Username e.g. [email protected] |
SMTP_PASS |
SMTP password e.g. password |
SMTP_PORT |
SMTP Port |
EMAIL_OVERRIDE |
Ignore all options and use this: # example: {"transport":"smtp","settings":{"port":2525,"host":"smtp.mailtrap.io","auth":{"user":"23esdffd53ac","pass":"324csdfsdf989a"}}} |
The following ports are exposed.
Port | Description |
---|---|
3001 |
NodeJS API Server |
For debugging and maintenance purposes you may want access the containers shell.
docker exec -it (whatever your container name is e.g. formio) bash