diff --git a/.codeclimate.yml b/.codeclimate.yml deleted file mode 100644 index e069e341..00000000 --- a/.codeclimate.yml +++ /dev/null @@ -1,29 +0,0 @@ -engines: - eslint: - enabled: true - csslint: - enabled: true - eslint: - enabled: true - fixme: - enabled: true - duplication: - enabled: true - config: - languages: - - javascript -ratings: - paths: - - "**.css" - - "**.js" - - "**.jsx" - - "**.module" - -exclude_paths: -- public/dist/** -- node_modules/** -- public/lib/** -- uploads/** -- docs/** -- public/populate_template_cache.js -- scripts/** diff --git a/.env.example b/.env.example index 9d31fe83..f07991ff 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,5 @@ # TellForm Configuration File +## TODO: Have commented out examples that would work. ################################### # Common configuration variables @@ -14,7 +15,7 @@ NODE_ENV=development # Set to a randomly generated 16 bytes string SECRET_KEY=ChangeMeChangeMe -# URI of Mongo database that TellForm will connect to +# URI of Mongo database that TellForm will connect to #DO NOT CHANGE MONGODB_URI=mongodb://mongo/tellform @@ -121,4 +122,4 @@ APP_NAME= APP_KEYWORDS= # Set this to set the 'description' meta property in the HTML head -APP_DESC= \ No newline at end of file +APP_DESC= diff --git a/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md similarity index 100% rename from ISSUE_TEMPLATE.md rename to .github/ISSUE_TEMPLATE.md diff --git a/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md similarity index 100% rename from PULL_REQUEST_TEMPLATE.md rename to .github/PULL_REQUEST_TEMPLATE.md diff --git a/.travis.yml b/.travis.yml deleted file mode 100755 index b6e41b9b..00000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: node_js -dist: trusty -sudo: false -node_js: - - "6.11.2" -env: - - NODE_ENV=travis TRAVIS=travis CXX=g++-4.8 -services: - - mongodb - - redis -addons: - code_climate: - repo_token: 6c3a1b81a09b2338d6f30913c1bcad115026689752cbb499a0a25061cda6fbcf -install: - - npm install phantomjs - - npm install -g grunt - - npm install -script: - - yarn run travis diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 6c8f8f23..023b8aa2 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,44 +1,44 @@ # Contributor Covenant Code of Conduct -## Our Pledge +##Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. -## Our Standards +##Our Standards Examples of behavior that contributes to creating a positive environment include: -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members + * Using welcoming and inclusive language + * Being respectful of differing viewpoints and experiences + * Gracefully accepting constructive criticism + * Focusing on what is best for the community + * Showing empathy towards other community members Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting + * The use of sexualized language or imagery and unwelcome sexual attention or advances + * Trolling, insulting/derogatory comments, and personal or political attacks + * Public or private harassment + * Publishing others' private information, such as a physical or electronic address, without explicit permission + * Other conduct which could reasonably be considered inappropriate in a professional setting -## Our Responsibilities +##Our Responsibilities -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. +Project maintainers reserve the right take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. -## Scope +##Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. -## Enforcement +##Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at team@tellform.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. -## Attribution +##Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] diff --git a/Dockerfile b/Dockerfile index 4c957018..eb92b05c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,39 +1,36 @@ -# Build: -# docker build -t tellform-prod -f ./Dockerfile-production . -# -# Run: -# docker run -it tellform-prod - FROM node:10-alpine -MAINTAINER Arielle Baldwynn +MAINTAINER OhMyForm # Install some needed packages RUN apk add --no-cache \ git \ && rm -rf /tmp/* +## TODO: Crush these consecutive RUN's into a single run if possible. # Install NPM Global Libraries RUN npm install --quiet -g grunt bower pm2 && npm cache clean --force -WORKDIR /opt/tellform -RUN mkdir -p /opt/tellform/public/lib +WORKDIR /opt/app +RUN mkdir -p /opt/app/public/lib +## TODO: Optimize layers here as copy layers can be easily reduced if saner COPY usage is achieved. # Add bower.json -COPY bower.json /opt/tellform/bower.json -COPY .bowerrc /opt/tellform/.bowerrc +COPY bower.json /opt/app/bower.json +COPY .bowerrc /opt/app/.bowerrc -COPY ./process.yml /opt/tellform/process.yml -COPY ./app /opt/tellform/app -COPY ./public /opt/tellform/public -COPY ./config /opt/tellform/config -COPY ./gruntfile.js /opt/tellform/gruntfile.js -COPY ./server.js /opt/tellform/server.js -COPY ./scripts/create_admin.js /opt/tellform/scripts/create_admin.js +COPY ./process.yml /opt/app/process.yml +COPY ./app /opt/app/app +COPY ./public /opt/app/public +COPY ./config /opt/app/config +COPY ./gruntfile.js /opt/app/gruntfile.js +COPY ./server.js /opt/app/server.js +COPY ./scripts/create_admin.js /opt/app/scripts/create_admin.js +## TODO: Find a method that's better than this for passing ENV's if possible. # Set default ENV ENV NODE_ENV=development ENV SECRET_KEY=ChangeMeChangeMe -#ENV MONGODB_URI=mongodb://mongo/tellform +#ENV MONGODB_URI=mongodb://mongo/ohmyform #ENV REDIS_URL=redis://redis:6379 ENV PORT=5000 ENV BASE_URL=localhost @@ -41,20 +38,20 @@ ENV SOCKET_PORT=20523 ENV SIGNUP_DISABLED=FALSE ENV SUBDOMAINS_DISABLED=FALSE ENV ENABLE_CLUSTER_MODE=FALSE -ENV MAILER_EMAIL_ID=tellform@localhost +ENV MAILER_EMAIL_ID=ohmyform@localhost ENV MAILER_PASSWORD= -ENV MAILER_FROM=tellform@localhost +ENV MAILER_FROM=ohmyform@localhost ENV MAILER_SERVICE_PROVIDER= ENV MAILER_SMTP_HOST= ENV MAILER_SMTP_PORT= ENV MAILER_SMTP_SECURE= ENV CREATE_ADMIN=FALSE -ENV ADMIN_EMAIL=admin@tellform.com +ENV ADMIN_EMAIL=admin@ohmyform.com ENV ADMIN_USERNAME=root ENV ADMIN_PASSWORD=root -ENV APP_NAME=Tellform +ENV APP_NAME=OhMyForm ENV APP_KEYWORDS= ENV APP_DESC= @@ -63,15 +60,18 @@ ENV COVERALLS_REPO_TOKEN= ENV GOOGLE_ANALYTICS_ID= ENV RAVEN_DSN= +## TODO: Determine if it's necessary to have this COPY be it's own separate operation. # Copies the local package.json file to the container # and utilities docker container cache to not needing to rebuild # and install node_modules/ everytime we build the docker, but only # when the local package.json file changes. # Add npm package.json -COPY ./package.json /opt/tellform/package.json +COPY ./package.json /opt/app/package.json RUN npm install --only=production --quiet RUN bower install --allow-root RUN grunt build +## TODO: Determine if it would be possible to do a multi stage container where the prebuilt app is copied with nothing else from the build step. -# Run TellForm server +## TODO: Make this configure things on startup in a sane way or don't if the operator passes any configuration files perhaps via a start.sh. +# Run OhMyForm server CMD ["node", "server.js"] diff --git a/INSTALLATION_INSTRUCTIONS.md b/INSTALLATION_INSTRUCTIONS.md deleted file mode 100644 index 1a871488..00000000 --- a/INSTALLATION_INSTRUCTIONS.md +++ /dev/null @@ -1,125 +0,0 @@ -TellForm Installation Instructions -================================== - - -## Table of Contents - -- [Local Deployment with Docker](#local-deployment-with-docker) -- [AWS AMI Deployment](#aws-ami-deployment) - - -## Local deployment with Docker - -Refer to [docker_files](https://github.com/tellform/docker_files). - -## AWS AMI Deployment - -### Prerequisites - -Instructions here are tested on an Amazon Linux AMI. First, set up your fresh new AMI by setting the environment variables: - -``` -$ sudo vim /etc/environment - -LANG=en_US.utf-8 -LC_ALL=en_US.utf-8 -``` - -Next, update and install build tools: -``` -$ sudo yum update -y -$ sudo yum groupinstall "Development Tools" -y -``` - -### Install docker - -``` -$ sudo yum install -y docker -$ sudo service docker start -``` - -To ensure docker can be run without `sudo` each time: -``` -$ sudo usermod -a -G docker ec2-user -$ logout -``` - -SSH back in, and test that `docker info` runs successfully. - -### Install docker-compose - -``` -$ sudo -i -$ curl -L https://github.com/docker/compose/releases/download/1.15.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose -$ sudo chmod +x /usr/local/bin/docker-compose -$ logout -``` - -### Clone our repo - -``` -$ git clone https://github.com/datagovsg/formsg.git -``` - -### Prepare .env file - -The `.env` file for remote deployment (or production) is slightly different from that of local deployment. -Create `.env` file at project root folder. Similarly, fill in `MAILER_SERVICE_PROVIDER`, `MAILER_EMAIL_ID`, `MAILER_PASSWORD` and `MAILER_FROM`. Note that now you have to fill in the public IP of your instance in `BASE_URL`. - -``` -APP_NAME=FormSG -APP_DESC= -APP_KEYWORDS= -NODE_ENV=production -BASE_URL= -PORT=4545 -DB_PORT_27017_TCP_ADDR= -REDIS_DB_PORT_6379_TCP_ADDR=formsg-redis -username=formsg_admin -MAILER_SERVICE_PROVIDER= -MAILER_EMAIL_ID= -MAILER_PASSWORD= -MAILER_FROM= -SIGNUP_DISABLED=false -SUBDOMAINS_DISABLED=true -DISABLE_CLUSTER_MODE=true -RAVEN_DSN= -PRERENDER_TOKEN= -COVERALLS_REPO_TOKEN= -``` - -### Install npm, bower and grunt - -``` -$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash -$ . ~/.nvm/nvm.sh -$ nvm install 6.11.2 -$ npm install -g bower -$ npm install -g grunt-cli -$ npm install grunt -``` - -### Install dependencies - -``` -$ npm install --production -``` - -### Build docker image - -``` -$ docker-compose -f docker-compose-production.yml build -``` - -### Run docker containers - -``` -$ docker run -d -p 27017:27017 -v /data/db:/data/db --name formsg-mongo mongo -$ docker-compose -f docker-compose-production.yml up -``` - -Note that unlike dev, mongo container is run separately from compose. Hence `docker-compose down` does not take down the mongo container each time. Your application should run on the default port 80, so in your browser just go to your public IP. - -## Support - -Please contact David Baldwynn (team@tellform.com) for any details. \ No newline at end of file diff --git a/README.md b/README.md index 59ca07e0..1ea8f364 100755 --- a/README.md +++ b/README.md @@ -1,187 +1,72 @@ -TellForm 2.1.0 -======== +# OhMyForm 0.2.1 -[![Code Shelter](https://www.codeshelter.co/static/badges/badge-flat.svg)](https://www.codeshelter.co/) -[![Build Status](https://travis-ci.org/tellform/tellform.svg?branch=master)](https://travis-ci.org/tellform/tellform) -![Project Status](https://img.shields.io/badge/status-2.1.0-green.svg) -[![Codacy Badge](https://api.codacy.com/project/badge/Grade/3491e86eb7194308b8fc80711d736ede)](https://www.codacy.com/app/david-baldwin/tellform?utm_source=github.com&utm_medium=referral&utm_content=tellform/tellform&utm_campaign=Badge_Grade) + + + + + +![Project Status](https://img.shields.io/badge/status-0.2.1-green.svg) + + -![Discord](https://img.shields.io/discord/586697165980565504.svg?label=Discord%20Chat) -> An *opensource alternative to TypeForm* that can create [stunning mobile-ready forms](https://tellform.com/examples) , surveys and questionnaires. +[![Discord](https://img.shields.io/discord/595773457862492190.svg?label=Discord%20Chat)](https://discord.gg/3jYMAYg) +> An *open source alternative to TypeForm* that can create [stunning mobile-ready forms](https://ohmyform.com/examples) , surveys and questionnaires. -[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/tellform/tellform/tree/master) +[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/ohmyform/ohmyform/tree/production) ## Table of Contents -- [Features](#features) -- [How to Contribute](#how-to-contribute) -- [Quickstart](#quickstart) -- [Deploying with Docker](#deploying-with-docker) -- [Testing your Application](#testing-your-application) -- [Advanced Configuration](#configuration) -- [Where to Get Help](#where-to-get-help) -- [Sponsors](#sponsors) -- [Backers](#backers) -- [Contributors](#contributors) -- [Mentions on the Web](#mentions-on-the-web) + + +- [OhMyForm 0.2.1](#ohmyform-021) + - [Table of Contents](#table-of-contents) + - [Features](#features) + - [Currently following features are implemented:](#currently-following-features-are-implemented) + - [On the Roadmap for v1.0.0](#on-the-roadmap-for-v100) + - [How to Contribute](#how-to-contribute) + - [Quickstart](#quickstart) + - [Where to get help](#where-to-get-help) + + ## Features ### Currently following features are implemented: -- Multi-Language Support -- 11 possible question types -- Editable start and end pages -- Export Submissions to XLS, JSON or CSV -- Native Analytics and Google Analytics Support -- Custom Subdomains for each User -- Embeddable Forms -- Forms as a Service API -- Deployable with Heroku and DockerHub + - Multi-Language Support (Semi implemented) + - 11 possible question types + - Editable start and end pages + - Export Submissions to XLS, JSON or CSV + - Native Analytics and Google Analytics Support + - Custom Subdomains for each User + - Embeddable Forms + - Forms as a Service API -### On the Roadmap for v3.0.0 -- Implement encryption for all form data -- Add Typeform API integration -- Add plugin/3rd party integration support (ala Slack) -- Create wiki for easy installation and setup -- Add Stripe/Payment Form field -- Add Custom Background and Dropdown Field Images -- Add File Upload Form Field +### On the Roadmap for v1.0.0 + - Implement encryption for all form data + - Add Typeform API integration + - Add plugin/3rd party integration support (ala Slack) + - Create wiki for easy installation and setup + - Add Stripe/Payment Form field + - Add Custom Background and Dropdown Field Images + - Add File Upload Form Field + - Deployable with Heroku and DockerHub + + ## Quickstart -Before you start, make sure you have -1. [Redis](https://redis.io/) installed and running at 127.0.0.1:6379 -2. [MongoDB](https://www.mongodb.com/) installed and running at 127.0.0.1:27017 (OR specify the host and port in config/env/all) +Follow documentation hosted on [OhMyForm.com](http://ohmyform.com/docs/install/) it will be the main and hopefully only location to obtain the up to date documentation. -Also make sure to install [DNS Masq](http://www.thekelleys.org.uk/dnsmasq/doc.html) or equivalent if running it locally on your computer (look at dns_masq_setup_osx for instructions on OSX) - -Install dependencies first. -```bash -$ npm install -$ bower install -``` - -Setup environment. -```bash -$ grunt build -``` - -Create your user account -```bash -$ node ./scripts/setup.js -``` - -OR create your .env file -``` -GOOGLE_ANALYTICS_ID=yourGAID -PRERENDER_TOKEN=yourPrerender.ioToken -COVERALLS_REPO_TOKEN=yourCoveralls.ioToken -BASE_URL=localhost -DSN_KEY=yourPrivateRavenKey - -# Mail config -MAILER_EMAIL_ID=user@domain.com -MAILER_PASSWORD=some-pass -MAILER_FROM=user@domain.com - -# Use this for one of Nodemailer's pre-configured service providers -MAILER_SERVICE_PROVIDER=SendGrid - -# Use these for a custom service provider -# Note: MAILER_SMTP_HOST will override MAILER_SERVICE_PROVIDER -MAILER_SMTP_HOST=smtp.domain.com -MAILER_SMTP_PORT=465 -MAILER_SMTP_SECURE=TRUE - -``` - -Side note: ___Currently we are using Raven and Sentry [https://www.getsentry.com](https://www.getsentry.com) for error logging. To use it you must provide a valid private DSN key in your .env file and a public DSN key in app/views/layout.index.html___ - -#### To run the development version: - -Set ```NODE_ENV=development``` in .env file -```$ grunt``` - -#### To run the production version: - -Set ```NODE_ENV=production``` in .env file -```$ grunt``` - -Your application should run on port 3000 or the port you specified in your .env file, so in your browser just go to [http://localhost:3000](http://localhost:3000) - -## Deploying with Docker - -To deploy with docker, first install docker [here](https://docs.docker.com/engine/installation/). - -Then run follow these steps: - -### Step 1: Clone the repo - -`$ git clone https://github.com/tellform/docker_files.git` - -### Step 2: Setup TellForm Configuration - -Create your .env file by copying the .env.dist file included in the repo and changing it to suit your deployment. - -Important: You need to fill out all of the ENV variables in the "Mail Settings" section or your TellForm instance won't work. - -If you want to have https, make sure to change 'TLS_FLAVOR' - -### Step 3: Start your TellForm instance - -`docker-compose up -d` - -TellForm should now be accessible on http://localhost - -## Testing Your Application -You can run the full test suite included with TellForm with the test task: - -``` -$ grunt test -``` - -This will run both the server-side tests (located in the app/tests/ directory) and the client-side tests (located in the public/modules/*/tests/). - -To execute only the server tests, run the test:server task: - -``` -$ grunt test:server -``` - -And to run only the client tests, run the test:client task: - -``` -$ grunt test:client -``` - -Currently the live example uses heroku github deployments. The Docker file is out of date and does not work. If someone wishes to get it working feel free to submit a pull request. - -To calculate your total test coverage with Istanbul, run the coverage task -```bash -$ grunt coverage -``` - -To calculate your server-side test coverage with Istanbul, run the coverage task -```bash -$ grunt coverage:server -``` - -To calculate your client-side test coverage with Istanbul, run the coverage task -```bash -$ grunt coverage:client -``` - -## Configuration + + ## Where to get help -[Gitter Chat](https://gitter.im/tellform/Lobby) +[![Discord](https://img.shields.io/discord/595773457862492190.svg?label=Discord%20Chat)](https://discord.gg/Y2TTePM) -[Official Twitter](https://twitter.com/tellform_real) - - -## Sponsors - -Does your company use TellForm? Help keep the project bug-free and feature rich by [sponsoring the project](https://opencollective.com/tellform#sponsor). - - - - - -## Backers - -Love our work and community? [Become a backer](https://opencollective.com/tellform). - - - - - - - - - -## Contributors - - -| [
David Baldwynn](http://baldwynn.me)
[๐Ÿ’ป](https://github.com/tellform/tellform/commits?author=whitef0x0 "Code") [๐Ÿ”ง](#tool-whitef0x0 "Tools") [๐Ÿš‡](#infra-whitef0x0 "Infrastructure (Hosting, Build-Tools, etc)") [๐Ÿ“–](https://github.com/tellform/tellform/commits?author=whitef0x0 "Documentation") [๐Ÿ’ก](#example-whitef0x0 "Examples") [๐ŸŽจ](#design-whitef0x0 "Design") [๐Ÿ”](#fundingFinding-whitef0x0 "Funding Finding") [๐Ÿ‘€](#review-whitef0x0 "Reviewed Pull Requests") [โš ๏ธ](https://github.com/tellform/tellform/commits?author=whitef0x0 "Tests") | [
Samuel Laulhau](https://samuellaulhau.fr)
[๐Ÿ’ป](https://github.com/tellform/tellform/commits?author=lalop "Code") [๐ŸŒ](#translation-lalop "Translation") | [
Arun Pattnaik](http://arun.co)
[๐ŸŽจ](#design-arunpattnaik "Design") | [
Thiรชn Toรกn](https://toanalien.com)
[๐Ÿ›](https://github.com/tellform/tellform/issues?q=author%3Atoanalien "Bug reports") [๐Ÿ’ป](https://github.com/tellform/tellform/commits?author=toanalien "Code") [๐Ÿ“–](https://github.com/tellform/tellform/commits?author=toanalien "Documentation") | [
Adrian Portabales](https://github.com/AdrianP-)
[๐Ÿ›](https://github.com/tellform/tellform/issues?q=author%3AAdrianP- "Bug reports") [๐Ÿ’ป](https://github.com/tellform/tellform/commits?author=AdrianP- "Code") | [
Peter Thaleikis](https://github.com/spekulatius)
[๐Ÿ“–](https://github.com/tellform/tellform/commits?author=spekulatius "Documentation") | [
Mickaรซl Andrieu](http://www.mickael-andrieu.com)
[๐Ÿ“–](https://github.com/tellform/tellform/commits?author=mickaelandrieu "Documentation") | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| [
Ahmad Luqman](https://github.com/ahmad-luqman)
[๐Ÿ“–](https://github.com/tellform/tellform/commits?author=ahmad-luqman "Documentation") | [
Peter Dave Hello](https://www.peterdavehello.org/)
[๐Ÿ“–](https://github.com/tellform/tellform/commits?author=PeterDaveHello "Documentation") | - -## Mentions on the Web - -[t3n.de](http://t3n.de/news/open-source-alternative-typeform-tellform-707295/) - -[BootCSS Expo](http://expo.bootcss.com/) - -[Product Hunt](https://www.producthunt.com/tech/tellform) - -[Hacker News Post](https://news.ycombinator.com/item?id=11711095) - -[Reddit Posts](https://www.reddit.com/domain/tellform.com/) - -[Betapage](https://betapage.co/startup/tellform) - -[Opensource.com](http://opensource.com/article/17/2/tools-online-surveys-polls) + diff --git a/Vagrantfile b/Vagrantfile index c6489ef7..b1806199 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,6 +1,8 @@ # -*- mode: ruby -*- # vi: set ft=ruby : +## TODO: Reconsider this as we don't have this configuration anymore. + # All Vagrant configuration is done below. The "2" in Vagrant.configure # configures the configuration version (we support older styles for # backwards compatibility). Please don't change it unless you know what diff --git a/dev_entrypoint.sh b/dev_entrypoint.sh index 823491a0..97ae1436 100644 --- a/dev_entrypoint.sh +++ b/dev_entrypoint.sh @@ -1,5 +1,5 @@ #!/bin/bash - +## TODO: Reconsider this as I think that it's no longer relevant. line=$(head -n 1 /etc/hosts) echo "$line tellform.dev $(hostname)" >> /etc/hosts @@ -7,4 +7,4 @@ echo "$line tellform.dev $(hostname)" >> /etc/hosts service sendmail restart # Run Server -npm start \ No newline at end of file +npm start diff --git a/dns_masq_setup_osx.md b/dns_masq_setup_osx.md index 2093b319..e3e19ce5 100644 --- a/dns_masq_setup_osx.md +++ b/dns_masq_setup_osx.md @@ -1,3 +1,4 @@ + # wildcard DNS in localhost development - install [dnsmasq](http://www.thekelleys.org.uk/dnsmasq/doc.html) ``` diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 4b619de0..00000000 --- a/docker-compose.yml +++ /dev/null @@ -1,55 +0,0 @@ -version: "3" -services: - redis: - restart: always - image: redis - networks: - - back-tier - mongo: - restart: always - image: mongo - volumes: - - ".data/mongo:/data" - networks: - - back-tier - tellform: - build: - context: . - environment: - CREATE_ADMIN: "TRUE" - MONGODB_URI: mongodb://mongo/tellform - REDIS_URL: redis://redis -# volumes: -# - .:/opt/tellform - links: - - mongo - - redis - ports: - - "5000:5000" - depends_on: - - mongo - - redis - networks: - - back-tier - web: - # image: tellform/nginx:stable - build: - context: ./nginx - # image: nginx:1.13 - restart: always - ports: - - "80:80" - - "443:443" - - "20523:20523" - environment: - NODE_ENV: development - #volumes: - # - "$ROOT/certs:/certs" - # - ./nginx/conf.d:/etc/nginx/conf.d - networks: - - back-tier - -networks: - back-tier: - driver: bridge - diff --git a/docker/compose/docker-compose.yml b/docker/compose/docker-compose.yml new file mode 100644 index 00000000..39057c09 --- /dev/null +++ b/docker/compose/docker-compose.yml @@ -0,0 +1,32 @@ +## TODO: add a compose examples directory with various deployment options. +version: "3" +services: + redis: + image: redis + mongo: + image: mongo + volumes: + - "./data/mongo:/data" + tellform: + image: ohmyform/ohmyform + environment: + CREATE_ADMIN: "TRUE" + SOCKET_PORT: "5000" + SOCKET_PORT_EXTERN_VISIBLE: "TRUE" + MONGODB_URI: mongodb://mongo/tellform + REDIS_URL: redis://redis + MAILER_SMTP_HOST: mail + MAILER_SMTP_PORT: 1025 + links: + - mongo + - redis + - mail + ports: + - "5000:5000" + depends_on: + - mongo + - redis + mail: + image: mailhog/mailhog + ports: + - "5050:8025" diff --git a/nginx/Dockerfile b/docker/nginx/Dockerfile similarity index 93% rename from nginx/Dockerfile rename to docker/nginx/Dockerfile index 3959a099..5c9b61e8 100644 --- a/nginx/Dockerfile +++ b/docker/nginx/Dockerfile @@ -1,4 +1,5 @@ FROM alpine:edge +## TODO: Reconsider this. RUN apk add --no-cache nginx certbot openssl python py-jinja2 COPY *.py / diff --git a/nginx/conf/nginx.conf b/docker/nginx/conf/nginx.conf similarity index 100% rename from nginx/conf/nginx.conf rename to docker/nginx/conf/nginx.conf diff --git a/nginx/conf/tls.conf b/docker/nginx/conf/tls.conf similarity index 100% rename from nginx/conf/tls.conf rename to docker/nginx/conf/tls.conf diff --git a/nginx/config.py b/docker/nginx/config.py similarity index 100% rename from nginx/config.py rename to docker/nginx/config.py diff --git a/nginx/letsencrypt.py b/docker/nginx/letsencrypt.py similarity index 100% rename from nginx/letsencrypt.py rename to docker/nginx/letsencrypt.py diff --git a/nginx/start.py b/docker/nginx/start.py similarity index 100% rename from nginx/start.py rename to docker/nginx/start.py diff --git a/docs/readme_logos/digitalOcean.png b/docs/readme_logos/digitalOcean.png deleted file mode 100644 index 7df2be2b..00000000 Binary files a/docs/readme_logos/digitalOcean.png and /dev/null differ diff --git a/docs/readme_logos/sentryIO.png b/docs/readme_logos/sentryIO.png deleted file mode 100644 index 49c7bc57..00000000 Binary files a/docs/readme_logos/sentryIO.png and /dev/null differ diff --git a/docs/readme_logos/sparkPost.png b/docs/readme_logos/sparkPost.png deleted file mode 100644 index e7282850..00000000 Binary files a/docs/readme_logos/sparkPost.png and /dev/null differ diff --git a/docs/readme_logos/statusPageIO.png b/docs/readme_logos/statusPageIO.png deleted file mode 100644 index 3bd96c4c..00000000 Binary files a/docs/readme_logos/statusPageIO.png and /dev/null differ diff --git a/docs/readme_logos/stickerMule.png b/docs/readme_logos/stickerMule.png deleted file mode 100644 index ee03354e..00000000 Binary files a/docs/readme_logos/stickerMule.png and /dev/null differ diff --git a/docs/readme_logos/theRoostStand.png b/docs/readme_logos/theRoostStand.png deleted file mode 100644 index 6e00a8e7..00000000 Binary files a/docs/readme_logos/theRoostStand.png and /dev/null differ diff --git a/start.sh b/start.sh index e19cf634..846f7b1b 100755 --- a/start.sh +++ b/start.sh @@ -1,4 +1,4 @@ #!/bin/bash - +## TODO: Reconsider this as I have no idea what the point of it is. node server.js #pm2 start process.yml diff --git a/tellform_installation_blog_post.mdown b/tellform_installation_blog_post.mdown deleted file mode 100644 index f8b4389e..00000000 --- a/tellform_installation_blog_post.mdown +++ /dev/null @@ -1,57 +0,0 @@ -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