Skip to content

Instantly share code, notes, and snippets.

@travist
Created June 14, 2019 04:45
Show Gist options
  • Save travist/caebdd8caa7f6b79b5d84410f64519bd to your computer and use it in GitHub Desktop.
Save travist/caebdd8caa7f6b79b5d84410f64519bd to your computer and use it in GitHub Desktop.
Form.io Enterprise Docker Compose

This is an example of how to deploy the Form.io Enterprise solution locally. To get this to work, please step through the following instructions.

  1. Install Docker to your local machine.
  2. Download this Gist to your local computer, and navigate to the folder within your machines terminal.
  3. Get a temporary LICENSE by contacting [email protected]
  4. Once you receive your license, paste this as the value for the LICENSE: environment variable within the docker-compose.yml file.
  5. Type docker-compose up within your terminal.
  6. This will install all dependencies locally and run the server @ http://localhost:3000 on your machine.
  7. Login using the credentials [email protected] and CHANGEME as the password.
  8. You should see a project called "Portal Base", open this project and then navigate to Settings > Stage Versions > Import Template
  9. Download the PDF Project to your local machine, and then import that into the Portal Base project
  10. Next navigate to Settings > Stage Settings > API Keys and create an API key for this project.
  11. Next navigate to Settings > PDF Management and then click on the Enterprise tab.
  12. Copy the value of the FORMIO_PROJECT and then request [email protected] to enable this project for Enterprise plan.
  13. Once this is done, you can then copy the following values and paste them into the docker-compose.yml file. Note: Your values will be different
    • FORMIO_PROJECT: 5d03208cf1fefc22cbefaa1d
    • FORMIO_PROJECT_TOKEN: 1ntb8zE4LhoaaekMMKQQ3kMakr1kUN
    • FORMIO_PDF_PROJECT: http://formio/formio
    • FORMIO_PDF_APIKEY: UzEevZFX9dXjIQ982E3aTIi9Ir3rAi
  14. Re-install the docker compose by typing the following.
    • docker-compose stop
    • docker-compose rm
    • docker-compose up

You should now have a completely working local Enterprise environment of Form.io.

version: '3.7'
services:
mongo:
image: mongo:4.1
restart: always
volumes:
- mdb-data:/data/db
networks:
formio:
aliases:
- mongo
environment:
MONGO_INITDB_ROOT_USERNAME:
MONGO_INITDB_ROOT_PASSWORD:
redis:
image: redis
networks:
formio:
aliases:
- redis
minio:
image: minio/minio
restart: always
volumes:
- minio-data:/data
- minio-config:/root/.minio
ports:
- "9000:9000"
networks:
formio:
aliases:
- minio
environment:
MINIO_ACCESS_KEY: CHANGEME
MINIO_SECRET_KEY: CHANGEME
command: server /data
formio:
image: formio/formio-enterprise
restart: always
ports:
- "3000:80"
networks:
formio:
aliases:
- formio
environment:
PRIMARY: 1
ADMIN_EMAIL: [email protected]
ADMIN_PASS: CHANGEME
FORMIO_FILES_SERVER: http://formio-files:4005
LICENSE:
formio-files:
image: formio/formio-files-core
restart: always
ports:
- "4005:4005"
networks:
formio:
aliases:
- formio-files
environment:
FORMIO_SERVER: http://formio
FORMIO_PROJECT:
FORMIO_PROJECT_TOKEN:
FORMIO_PDF_PROJECT: http://formio/formio
FORMIO_PDF_APIKEY:
FORMIO_S3_SERVER: minio
FORMIO_S3_PORT: 9000
FORMIO_S3_BUCKET: formio
FORMIO_S3_KEY: CHANGEME
FORMIO_S3_SECRET: CHANGEME
networks:
formio:
volumes:
mdb-data:
minio-data:
minio-config:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment