diff --git a/scripts/create_admin.js b/scripts/create_admin.js index d646da9b..6d5ee5c6 100644 --- a/scripts/create_admin.js +++ b/scripts/create_admin.js @@ -5,13 +5,14 @@ var config = require('../config/config'), exports.run = function(app, db, cb) { var User = mongoose.model('User'); + var email = 'admin@admin.com' || config.admin.email; var newUser = new User({ firstName: 'Admin', lastName: 'Account', - email: config.admin.email, - username: config.admin.username, - password: config.admin.password, + email: email, + username: 'root' || config.admin.username, + password: 'root' || config.admin.password, provider: 'local', roles: ['admin', 'user'] }); diff --git a/tellform_installation_blog_post.mdown b/tellform_installation_blog_post.mdown new file mode 100644 index 00000000..f8b4389e --- /dev/null +++ b/tellform_installation_blog_post.mdown @@ -0,0 +1,57 @@ +Introduction +=========== + +TellForm is a powerful, open-source form/survey tool that allows you to get data from your users quickly and easily while collecting powerful analytics to improve your surveys. TellForm offers a field by field analytics, custom subdomains per-user, an extendable API, logic-based field jumping, per-device visitor analytics and 11 types of form fields. + +By default, TellForm is setup to serve custom subdomains, but you can also configure it to work on a single domain, for those using it in more restricted environments. + +Exporters—both the official ones that the Prometheus team maintains as well as the community-contributed ones—provide information about everything from infrastructure, databases, and web servers to messaging systems, APIs, and more. + +In this tutorial, you'll install, configure, and secure TellForm to selfhost forms that will make it easy for you and your users to use. + +Prerequisites +Before following this tutorial make sure you have: + +One Ubuntu 16.x or 14.x Droplet, set up by following the [Initial Server Setup with Ubuntu 16.04 tutorial](https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-16-04), including a sudo non-root user and a firewall. +Nginx installed by following the first two steps of the [How To Install Nginx on Ubuntu 16.04 tutorial](https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-16-04). +Docker installed by following the steps of the [How To Install and Use Docker on Ubuntu 16.04 tutorial](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04) + + +## Step 1 - Fetch Docker-Compose Files + +``` +$ curl -L github.com/tellform/tellform/stable/blob/docker-compose.yml +$ curl -L github.com/tellform/tellform/stable/blob/.env +``` + +### Prepare .env file: +Create `.env` file at project root folder. Fill in `MAILER_SERVICE_PROVIDER`, `MAILER_EMAIL_ID`, `MAILER_PASSWORD` and `MAILER_FROM`. +``` +APP_NAME=TellForm +BASE_URL=localhost:3000 +PORT=3000 +DB_PORT_27017_TCP_ADDR=tellform-mongo +REDIS_DB_PORT_6379_TCP_ADDR=tellform-redis +MAILER_SERVICE_PROVIDER= +MAILER_EMAIL_ID= +MAILER_PASSWORD= +MAILER_FROM= +SIGNUP_DISABLED=false +SUBDOMAINS_DISABLED=true +DISABLE_CLUSTER_MODE=true +``` + +### Build docker image + +``` +$ docker-compose build +``` + +### Run docker containers with docker-compose + +Create and start mongo & redis docker container: +``` +$ docker-compose up -d +``` + +Your application should run at the BASE_URL you specified on port 443. \ No newline at end of file