{"id":13554224,"url":"https://github.com/fast-platform/fast-docker","last_synced_at":"2025-04-03T06:31:18.222Z","repository":{"id":140419357,"uuid":"134006034","full_name":"fast-platform/fast-docker","owner":"fast-platform","description":"Form.io API Server and Form Builder Client Docker Image","archived":false,"fork":false,"pushed_at":"2018-07-06T18:41:18.000Z","size":29,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-04T02:32:50.583Z","etag":null,"topics":["docker","docker-compose","fao","formio","unfao"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fast-platform.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-05-18T21:30:14.000Z","updated_at":"2019-05-27T21:46:30.000Z","dependencies_parsed_at":"2024-01-14T16:08:48.744Z","dependency_job_id":"61aaa9df-263f-4ba4-ab01-4247a102474e","html_url":"https://github.com/fast-platform/fast-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fast-platform%2Ffast-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fast-platform%2Ffast-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fast-platform%2Ffast-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fast-platform%2Ffast-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fast-platform","download_url":"https://codeload.github.com/fast-platform/fast-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246947978,"owners_count":20859354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","fao","formio","unfao"],"created_at":"2024-08-01T12:02:42.575Z","updated_at":"2025-04-03T06:31:17.807Z","avatar_url":"https://github.com/fast-platform.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","docker"],"sub_categories":[],"readme":"# Formio API Server Docker Container\n\nDocker container for [Form.io](https://form.io)'s open-source [API Server](https://github.com/formio/formio) based on Alpine Linux.\n\n### Usage\n\nTo use this container, just pull the latest docker hub image from [unfao/formio](https://hub.docker.com/r/unfao/formio/).\n\n1. Create an external network\n\n```\ndocker network create formio\n```\n\n2. Create the mongo instance (OPTIONAL) \n \n\u003e You may skip this step and specify the mongodb connection string to the formio container instead using the `MONGO` environment variable.\n\n```\ndocker run -itd  \\\n  --name formio-mongo \\\n  --network formio \\\n  --volume /opt/mongodb:/data/db \\\n  --restart unless-stopped \\\n  mongo;\n```\n\n3. Create the formio instance (remember to remove the mongo link if not using it).\n\n**IMPORTANT** The listening port must be the same as the port defined in the HOST variable.\n\n```\ndocker run -itd \\\n    -e \"DOMAIN=https://lvh.me\" \\\n    -e \"ROOT_EMAIL=admin@example.com\" \\\n    -e \"ROOT_PASS=admin.123\" \\\n    -e \"USER_FORM=admin\" \\\n    -e \"USER_LOGIN_FORM=admin/login\" \\\n    -e \"MONGO=mongodb://formio-mongo:27017/formioapp\" \\\n    -e \"MONGO_SECRET=CHANGEME\" \\\n    -e \"JWT_SECRET=CHANGEME\" \\\n    -e \"PROTOCOL=http\" \\\n    -e \"HOST=localhost:8080\" \\\n    --name formio-api \\\n    --network formio \\\n    --link formio-mongo:mongo \\\n    --restart unless-stopped \\\n    -p 8080:3001 \\\n    unfao/formio\n```\n\n### Build\n\nTo build this docker container just clone the repository and build it to your liking using docker-compose.\n\n```\ngit clone https://github.com/un-fao/fast-docker.git         # clone the repository\ncd ./fast-docker                                       \ncp template.env ./.env                                      # modify and save the .env file\ndocker-compose up -d                                        # fire-up the docker container\n```\n\n## Environment Configuration\n\nThe file `template.env` is provided as template for setting up the environment variables.  Once ready, save it as `.env` to build the docker image.\n\n##### Docker Configuration\n\nThese are some of the environment variables available for configuring the docker container.  Check [template.env](template.env) for more examples and [custom-environment-variables.json](config/custom-environment-variables.json) to see how they map themselves into the API server configuration.\n\n| Setting             | Description                                          | Example                         |\n|------------------|------------------------------------------------------|---------------------------------|\n| NETWORK          | The docker external network to attach the container. | `formio`                        |\n| PORT         | The port for accessing the API server.               | `8443`                          |\n| PROJECT_TEMPLATE | The project template variation to use (leave empty for default template). | `default`                        |\n| ROOT_EMAIL    | The default root account email used when installing the Form.io API server. | `admin@example.com`                          |\n| ROOT_PASS    | The default root account password used when installing the Form.io API server.  | `admin.123`                          |\n| MONGO         | The MongoDB connection string to connect to your remote database. | `mongodb://formio-mongo:27017/formioapp`|\n| MONGO_SECRET | The database encryption secret.             | `FTFaVuIdSv4Hj2bjnwae`|\n| MONGO_HIGH_AVAILABILITY| \tIf your database is high availability (like from Mongo Cloud or Compose), then this needs to be set. | `1`|\n| JWT_SECRET | The secret password for JWT token encryption.|`YilQ9E1wOiITdWOeaMCL`|\n| JWT_EXPIRE_TIME | The expiration for the JWT Tokens. | `240`|\n| EMAIL_TYPE | The default email transport type (`sendgrid` or `mandrill`). | `sendgrid`|\n| EMAIL_USER | The sendgrid api_user string.| `sendgrid-user` |\n| EMAIL_PASS | The sendgrid api_key string.| `sendgrid-pass` |\n| EMAIL_KEY | The mandrill apiKey string. | `mandrill-key` |\n| EMAIL_OVERRIDE | Provides a way to point all Email traffic to a server (ignores all other email configurations). | `{\"transport\":\"smtp\",\"settings\":{\"port\":2525,\"host\":\"smtp.mailtrap.io\",\"auth\":{\"user\":\"23esdffd53ac\",\"pass\":\"324csdfsdf989a\"}}}` |\n\n\n## Project Templates\n\nTo include a custom project template, save it on the [templates](templates) directory using the following naming convention: `project.\u003cid\u003e.json` (e.g.: `project.basic.json`).  To install a specific template, set the `PROJECT_TEMPLATE` value to the templates `\u003cid\u003e`.  The `default` id is reserved for Form.io's [default project template](https://github.com/formio/formio-app-formio/blob/master/dist/project.json). All projects templates should use Form.io's Project JSON Schema.\n\n###### Example\n\nYou may have multiple project templates in your `templates` directory.\n\n```\n--- templates\n    |--- project.default.json\n    |--- project.full.json\n```\n\nThen on your `.env` file you just need to specify which template to use:\n\n```\nPROJECT_TEMPLATE=full\n```\n\nIf the install script fails to find the defined project, it will use Form.io's [default project](https://github.com/formio/formio-app-formio/blob/master/dist/project.json).\n\n\u003e If the mongodb database defined in the mongo connection string does not exist, then a new project will be initialized using the given project template.\n\n## Authors\n\n* **Alfredo Irarrazaval** - *Initial work* - [airarrazaval](https://github.com/airarrazaval)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffast-platform%2Ffast-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffast-platform%2Ffast-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffast-platform%2Ffast-docker/lists"}