Compare commits
No commits in common. "master" and "0.9.4" have entirely different histories.
@ -5,7 +5,6 @@ data
|
|||||||
docker
|
docker
|
||||||
node_modules
|
node_modules
|
||||||
selenium
|
selenium
|
||||||
examples
|
|
||||||
.all-contributorsrc
|
.all-contributorsrc
|
||||||
.csslintrc
|
.csslintrc
|
||||||
.editorconfig
|
.editorconfig
|
||||||
@ -19,11 +18,3 @@ docker-compose.yml
|
|||||||
Dockerfile
|
Dockerfile
|
||||||
Procfile
|
Procfile
|
||||||
protractor.conf.js
|
protractor.conf.js
|
||||||
pg_data
|
|
||||||
ui/.next
|
|
||||||
ui/node_modules
|
|
||||||
api/node_modules
|
|
||||||
api/pg_data
|
|
||||||
api/data
|
|
||||||
api/maria_data
|
|
||||||
api/dist
|
|
||||||
20
.github/FUNDING.yml
vendored
20
.github/FUNDING.yml
vendored
@ -1,12 +1,12 @@
|
|||||||
# These are supported funding model platforms
|
# These are supported funding model platforms
|
||||||
|
|
||||||
# github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||||
# patreon: # Replace with a single Patreon username
|
patreon: # Replace with a single Patreon username
|
||||||
open_collective: ohmyform-sustainability
|
open_collective: ohmyform
|
||||||
# ko_fi: # Replace with a single Ko-fi username
|
ko_fi: # Replace with a single Ko-fi username
|
||||||
# tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||||
# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||||
# liberapay: Leopere
|
liberapay: Leopere
|
||||||
# issuehunt: # Replace with a single IssueHunt username
|
issuehunt: # Replace with a single IssueHunt username
|
||||||
# otechie: # Replace with a single Otechie username
|
otechie: # Replace with a single Otechie username
|
||||||
# custom: https://patron.ohmyform.com
|
custom: https://patron.ohmyform.com
|
||||||
|
|||||||
45
.github/workflows/docker-image.yml
vendored
45
.github/workflows/docker-image.yml
vendored
@ -1,45 +0,0 @@
|
|||||||
name: Docker Image CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
release:
|
|
||||||
types:
|
|
||||||
- published
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Push Docker image to Docker Hub
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check out the repo
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
|
|
||||||
- name: Log in to Docker Hub
|
|
||||||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Extract metadata (tags, labels) for Docker
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
|
|
||||||
with:
|
|
||||||
images: ohmyform/ohmyform
|
|
||||||
tags: |
|
|
||||||
type=raw,value=latest
|
|
||||||
type=semver,pattern={{major}}
|
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
|
||||||
type=semver,pattern={{version}}
|
|
||||||
|
|
||||||
- name: Build and push Docker image
|
|
||||||
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
push: true
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
@ -61,9 +61,6 @@ local.properties
|
|||||||
.c9/
|
.c9/
|
||||||
data/
|
data/
|
||||||
mongod
|
mongod
|
||||||
pg_data
|
|
||||||
maria
|
|
||||||
*.sqlite
|
|
||||||
|
|
||||||
# General
|
# General
|
||||||
# =======
|
# =======
|
||||||
|
|||||||
203
CHANGELOG.md
203
CHANGELOG.md
@ -5,215 +5,12 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
<!--
|
|
||||||
Template for next version
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
-->
|
|
||||||
|
|
||||||
## [Unreleased]
|
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
* Fixed typo https://github.com/ohmyform/ohmyform/pull/185
|
|
||||||
* node prune location (https://github.com/ohmyform/ohmyform/issues/184)
|
|
||||||
|
|
||||||
### Security
|
|
||||||
|
|
||||||
## [1.0.3] - 2022-03-27
|
|
||||||
|
|
||||||
### Updates
|
|
||||||
|
|
||||||
* https://github.com/ohmyform/api/releases/tag/1.0.3
|
|
||||||
* https://github.com/ohmyform/ui/releases/tag/1.0.3
|
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
* minimal configuration example for caddy server (https://github.com/ohmyform/ohmyform/pull/167)
|
|
||||||
|
|
||||||
## [1.0.2] - 2022-03-13
|
|
||||||
|
|
||||||
### Updates
|
|
||||||
|
|
||||||
* https://github.com/ohmyform/api/releases/tag/1.0.2
|
|
||||||
* https://github.com/ohmyform/ui/releases/tag/1.0.2
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
- docker restart policy (https://github.com/ohmyform/ohmyform/issues/164)
|
|
||||||
|
|
||||||
## [1.0.1] - 2022-03-01
|
|
||||||
|
|
||||||
### Updates
|
|
||||||
|
|
||||||
* https://github.com/ohmyform/api/releases/tag/1.0.1
|
|
||||||
* https://github.com/ohmyform/ui/releases/tag/1.0.1
|
|
||||||
|
|
||||||
## [1.0.0] - 2022-02-28
|
|
||||||
|
|
||||||
### Updates
|
|
||||||
|
|
||||||
* https://github.com/ohmyform/api/releases/tag/1.0.0
|
|
||||||
* https://github.com/ohmyform/ui/releases/tag/1.0.0
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
- switched to supervisord based combined container
|
|
||||||
- upgrade to node 16
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
- heroku deployments
|
|
||||||
- fix problem with node-prune on production build
|
|
||||||
- variable names in examples (https://github.com/ohmyform/ohmyform/issues/134)
|
|
||||||
- error if /run/nginx already exists (https://github.com/ohmyform/ohmyform/pull/148)
|
|
||||||
- fix combine images
|
|
||||||
|
|
||||||
## [0.9.9] - 2021-02-14
|
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
- Submission export
|
|
||||||
- Lokalize reference
|
|
||||||
- more languages
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
- updated french translations by @Vercety87
|
|
||||||
- upgrade to node 14 (https://github.com/ohmyform/ohmyform/issues/99)
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
- missing dependency to @apollo/client
|
|
||||||
- footer rendering during authentication check
|
|
||||||
|
|
||||||
### Security
|
|
||||||
|
|
||||||
- authentication check for profile page
|
|
||||||
|
|
||||||
## [0.9.8] - 2020-09-02
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
- improved german translation (https://github.com/ohmyform/ui/pull/28)
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
- colors for landing page buttons
|
|
||||||
- menu selection type
|
|
||||||
|
|
||||||
### Security
|
|
||||||
|
|
||||||
- upgraded dependencies
|
|
||||||
|
|
||||||
## [0.9.6] - 2020-07-17
|
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
- slug for fields to be able to set value by url parameter
|
|
||||||
- form submission hokks
|
|
||||||
- default index.html for api without bundled ui
|
|
||||||
- slug for form fields can now be saved
|
|
||||||
- submission webhooks with ability to customize json payload
|
|
||||||
```
|
|
||||||
{
|
|
||||||
form: ID
|
|
||||||
submission: ID
|
|
||||||
created: DateTime
|
|
||||||
lastModified: DateTime
|
|
||||||
fields: [
|
|
||||||
{
|
|
||||||
field: ID
|
|
||||||
slug: String
|
|
||||||
value: any
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
- minify containers to reduce layer size
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
- bug in settings resolver with nullable fields
|
|
||||||
- bug if user was deleted and form still exists
|
|
||||||
- do not show login note if it is not set
|
|
||||||
- typo in dropdown options https://github.com/ohmyform/ohmyform/issues/96
|
|
||||||
- query parms are not parsed https://github.com/ohmyform/ui/pull/27 https://github.com/ohmyform/ohmyform/issues/100
|
|
||||||
- errors because of missing user reference (https://github.com/ohmyform/ohmyform/issues/102)
|
|
||||||
|
|
||||||
### Security
|
|
||||||
|
|
||||||
- container now runs as non root user
|
|
||||||
|
|
||||||
## [0.9.5] - 2020-06-10
|
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
- `DEFAULT_ROLE` -> `admin` | `superuser` | `user` - with `user` being the default, making it possible that new users can create their own forms after creating
|
|
||||||
- `LOGIN_NOTE` -> markdown for Login Page, to show info text on login page
|
|
||||||
- `HIDE_CONTRIB` -> ability to hide contribution banner
|
|
||||||
- mobile improvements for lists and home page
|
|
||||||
- markdown support for page paragraphs and field description
|
|
||||||
- hideable omf badge
|
|
||||||
- login notes
|
|
||||||
- username in admin toolbar
|
|
||||||
- github stars in multiple places
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
- verified spanish translations https://github.com/ohmyform/ui/pull/23
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
- di on setting resolver, prevented signup settings to be visible in ui
|
|
||||||
- return admin of form also for admins
|
|
||||||
- yes / no field fixed on admin and user view
|
|
||||||
- prev property error on div
|
|
||||||
- rating field default on admin
|
|
||||||
- number field defaults
|
|
||||||
- translations for field validation
|
|
||||||
- number validation
|
|
||||||
- side menu only shows accessible entries
|
|
||||||
|
|
||||||
## [0.9.4] - 2020-06-09
|
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
- Fetch Server Settings to determine if signup is available
|
|
||||||
- `SPA` env variable to have static page with loading spinner before redirect
|
|
||||||
- `de`, `fr`, `es`, `it`, `cn` base folders for translations
|
|
||||||
- finish translating `de` and `en`
|
|
||||||
- add `yarn translation:sort` to order translations (to ensure the same order
|
|
||||||
when we add / change translations)
|
|
||||||
- add `yarn translation:missing <lang>` to print a list of missing translations
|
|
||||||
for the given language (this takes `en` as a baseline)
|
|
||||||
- travis for tests
|
|
||||||
- eslint with prettier
|
|
||||||
- `SIGNUP_DISABLED=true` to prevent users from signing up
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
- `export` uses now spa mode for initial loading screen
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
- [OMF#93](https://github.com/ohmyform/ohmyform/issues/93) dropdown options are not saved
|
|
||||||
- redirect attempts on static export
|
|
||||||
- startup error with invalid create admin config
|
|
||||||
|
|
||||||
## [0.9.3] - 2020-06-04
|
## [0.9.3] - 2020-06-04
|
||||||
|
|
||||||
|
|||||||
@ -13,10 +13,6 @@
|
|||||||
|
|
||||||
<!-- /TOC -->
|
<!-- /TOC -->
|
||||||
|
|
||||||
## Translating
|
|
||||||
|
|
||||||
You can help us [translate](https://app.lokalise.com/public/379418475ede5d5c6937b0.31012044/) ever part of OhMyForm, when you want to add a new language please write either in discord or create a new issue.
|
|
||||||
|
|
||||||
## Report issues
|
## Report issues
|
||||||
|
|
||||||
You can [create issues](https://github.com/ohmyform/ohmyform/issues/new) to report bug or request feature.
|
You can [create issues](https://github.com/ohmyform/ohmyform/issues/new) to report bug or request feature.
|
||||||
|
|||||||
63
Dockerfile
63
Dockerfile
@ -1,73 +1,30 @@
|
|||||||
## Build UI
|
FROM node:12 as builder
|
||||||
FROM node:16-alpine as ui
|
|
||||||
|
|
||||||
WORKDIR /usr/src/ui
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
RUN apk --update --no-cache add curl bash g++ make libpng-dev
|
|
||||||
|
|
||||||
# install node-prune (https://github.com/tj/node-prune)
|
|
||||||
RUN curl -sf https://gobinaries.com/tj/node-prune | sh
|
|
||||||
|
|
||||||
COPY ui/ .
|
COPY ui/ .
|
||||||
|
|
||||||
RUN yarn install --frozen-lockfile
|
RUN yarn install --frozen-lockfile
|
||||||
RUN yarn build
|
RUN yarn export
|
||||||
|
|
||||||
# remove development dependencies
|
FROM node:12
|
||||||
RUN npm prune --production
|
|
||||||
|
|
||||||
# run node prune
|
|
||||||
# there is some problem running node prune that then prevents the frontend to load (just start with /form/1 and it will crash)
|
|
||||||
#RUN /usr/local/bin/node-prune
|
|
||||||
|
|
||||||
## Build API
|
|
||||||
FROM node:16-alpine as api
|
|
||||||
LABEL maintainer="OhMyForm <admin@ohmyform.com>"
|
LABEL maintainer="OhMyForm <admin@ohmyform.com>"
|
||||||
|
|
||||||
WORKDIR /usr/src/api
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
RUN apk --update --no-cache add curl bash g++ make libpng-dev
|
|
||||||
|
|
||||||
# install node-prune (https://github.com/tj/node-prune)
|
|
||||||
RUN curl -sf https://gobinaries.com/tj/node-prune | sh
|
|
||||||
|
|
||||||
COPY api/ .
|
COPY api/ .
|
||||||
|
COPY --from=builder /usr/src/app/out /usr/src/app/public
|
||||||
RUN touch /usr/src/api/src/schema.gql && chown 9999:9999 /usr/src/api/src/schema.gql
|
|
||||||
|
|
||||||
RUN yarn install --frozen-lockfile
|
RUN yarn install --frozen-lockfile
|
||||||
RUN yarn build
|
RUN yarn build
|
||||||
|
|
||||||
# remove development dependencies
|
ENV PORT=3000 \
|
||||||
RUN npm prune --production
|
SECRET_KEY=ChangeMe \
|
||||||
|
|
||||||
# run node prune
|
|
||||||
RUN /usr/local/bin/node-prune
|
|
||||||
|
|
||||||
## Production Image.
|
|
||||||
FROM node:16-alpine
|
|
||||||
|
|
||||||
RUN apk --update add supervisor nginx && rm -rf /var/cache/apk/*
|
|
||||||
|
|
||||||
WORKDIR /usr/src
|
|
||||||
|
|
||||||
COPY --from=api /usr/src/api /usr/src/api
|
|
||||||
COPY --from=ui /usr/src/ui /usr/src/ui
|
|
||||||
|
|
||||||
RUN addgroup --gid 9999 ohmyform && adduser -D --uid 9999 -G ohmyform ohmyform
|
|
||||||
ENV SECRET_KEY=ChangeMe \
|
|
||||||
CREATE_ADMIN=FALSE \
|
CREATE_ADMIN=FALSE \
|
||||||
ADMIN_EMAIL=admin@ohmyform.com \
|
ADMIN_EMAIL=admin@ohmyform.com \
|
||||||
ADMIN_USERNAME=root \
|
ADMIN_USERNAME=root \
|
||||||
ADMIN_PASSWORD=root \
|
ADMIN_PASSWORD=root
|
||||||
NODE_ENV=production
|
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
RUN mkdir -p /run/nginx/
|
CMD [ "yarn", "start:prod" ]
|
||||||
RUN touch /usr/src/supervisord.log && chmod 777 /usr/src/supervisord.log
|
|
||||||
COPY supervisord.conf /etc/supervisord.conf
|
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
|
||||||
|
|
||||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]
|
|
||||||
# CMD [ "yarn", "start:prod" ]
|
|
||||||
|
|||||||
37
README.md
37
README.md
@ -4,14 +4,12 @@
|
|||||||
|
|
||||||

|

|
||||||

|

|
||||||
[](https://hub.docker.com/r/ohmyform/ohmyform)
|

|
||||||
[](https://app.lokalise.com/public/379418475ede5d5c6937b0.31012044/)
|
[](https://app.lokalise.com/public/379418475ede5d5c6937b0.31012044/)
|
||||||

|

|
||||||
|
|
||||||
[](https://heroku.com/deploy?template=https://github.com/ohmyform/ohmyform/tree/master)
|
[](https://heroku.com/deploy?template=https://github.com/ohmyform/ohmyform/tree/master)
|
||||||
|
|
||||||
[Demo](https://demo.ohmyform.org/) Username and password are just `demo`. We will reset the demo instance at least once for every new release and possibly more often so don't rely on it for sending actual forms expect no notice for resets.
|
|
||||||
|
|
||||||
> An *open source alternative to TypeForm* that can create stunning mobile-ready forms, surveys and questionnaires.
|
> An *open source alternative to TypeForm* that can create stunning mobile-ready forms, surveys and questionnaires.
|
||||||
|
|
||||||
[](https://discord.gg/MJqAuAZ)
|
[](https://discord.gg/MJqAuAZ)
|
||||||
@ -24,7 +22,8 @@
|
|||||||
- [OhMyForm](#ohmyform-091)
|
- [OhMyForm](#ohmyform-091)
|
||||||
- [Table of Contents](#table-of-contents)
|
- [Table of Contents](#table-of-contents)
|
||||||
- [Features](#features)
|
- [Features](#features)
|
||||||
- [On the Roadmap](#on-the-roadmap)
|
- [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)
|
- [How to Contribute](#how-to-contribute)
|
||||||
- [Quickstart](#quickstart)
|
- [Quickstart](#quickstart)
|
||||||
- [Where to get help](#where-to-get-help)
|
- [Where to get help](#where-to-get-help)
|
||||||
@ -33,30 +32,29 @@
|
|||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Multi-Language Support
|
### Currently following features are implemented:
|
||||||
|
|
||||||
|
- Multi-Language Support (Semi implemented)
|
||||||
- 11 possible question types
|
- 11 possible question types
|
||||||
- Editable start and end pages
|
- Editable start and end pages
|
||||||
- Export Submissions to XLS, JSON or CSV
|
- Export Submissions to XLS, JSON or CSV
|
||||||
- Native Analytics and Google Analytics Support
|
- Native Analytics and Google Analytics Support
|
||||||
|
- Custom Subdomains for each User
|
||||||
- Embeddable Forms
|
- Embeddable Forms
|
||||||
- Forms as a Service API
|
- Forms as a Service API
|
||||||
- Customizable Notifications on Form Submission
|
|
||||||
- Web Hooks on Form Submission
|
|
||||||
- Deployable with Heroku and DockerHub
|
|
||||||
- PostgreSQL and sqlite
|
|
||||||
|
|
||||||
<!-- TODO: Determine roadmap for OhMyForm if it is to be different from OhMyForm's roadmap. -->
|
<!-- TODO: Determine roadmap for OhMyForm if it is to be different from OhMyForm's roadmap. -->
|
||||||
<!-- ### On the Roadmap (Tentative pending [refactor](https://github.com/ohmyform/ohmyform/pull/1)) -->
|
<!-- ### On the Roadmap (Tentative pending [refactor](https://github.com/ohmyform/ohmyform/pull/1)) -->
|
||||||
|
### On the Roadmap for v1.0.0
|
||||||
### On the Roadmap
|
|
||||||
- Custom Subdomains for each User
|
|
||||||
- Implement encryption for all form data
|
- Implement encryption for all form data
|
||||||
- Add Typeform API integration
|
- Add Typeform API integration
|
||||||
- Add plugin/3rd party integration support (aka Slack)
|
- Add plugin/3rd party integration support (ala Slack)
|
||||||
- Create wiki for easy installation and setup
|
- Create wiki for easy installation and setup
|
||||||
- Add Stripe/Payment Form field
|
- Add Stripe/Payment Form field
|
||||||
- Add Custom Background and Dropdown Field Images
|
- Add Custom Background and Dropdown Field Images
|
||||||
- Add File Upload Form Field
|
- Add File Upload Form Field
|
||||||
|
- Deployable with Heroku and DockerHub
|
||||||
|
- Ditch MongoDB for a drop in replacement with better licensing.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -69,13 +67,7 @@ Please checkout our [contributing guide](CONTRIBUTING.md) on ways to contribute
|
|||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
If you pull the repository do not forget to execute: `git submodule update --init`
|
if you pull the repository do not forget to execute: `git submodule update --init`
|
||||||
|
|
||||||
### Some technical Insights
|
|
||||||
|
|
||||||
[API](https://github.com/ohmyform/api/tree/master/doc)
|
|
||||||
|
|
||||||
[UI](https://github.com/ohmyform/ui/tree/master/doc)
|
|
||||||
|
|
||||||
## Where to get help
|
## Where to get help
|
||||||
|
|
||||||
@ -98,7 +90,7 @@ Become a financial contributor and help us sustain our community. [[Contribute](
|
|||||||
|
|
||||||
#### Individuals
|
#### Individuals
|
||||||
|
|
||||||
[](https://opencollective.com/ohmyform-sustainability)
|
[](https://opencollective.com/ohmyform-sustainability)
|
||||||
|
|
||||||
#### Organizations
|
#### Organizations
|
||||||
|
|
||||||
@ -107,7 +99,4 @@ Support this project with your organization. Your logo will show up here with a
|
|||||||
[](https://opencollective.com/ohmyform-sustainability/organization/0/website)
|
[](https://opencollective.com/ohmyform-sustainability/organization/0/website)
|
||||||
[](https://opencollective.com/ohmyform-sustainability/organization/1/website)
|
[](https://opencollective.com/ohmyform-sustainability/organization/1/website)
|
||||||
[](https://opencollective.com/ohmyform-sustainability/organization/2/website)
|
[](https://opencollective.com/ohmyform-sustainability/organization/2/website)
|
||||||
[](https://opencollective.com/ohmyform-sustainability/organization/2/website)
|
|
||||||
[](https://opencollective.com/ohmyform-sustainability/organization/2/website)
|
|
||||||
[](https://opencollective.com/ohmyform-sustainability/organization/2/website)
|
|
||||||
|
|
||||||
|
|||||||
2
api
2
api
@ -1 +1 @@
|
|||||||
Subproject commit c2c421baa6f41e4e6fb812fa2978956aaf7aa0dd
|
Subproject commit 522db49d0ad3543d849d7a7e44df6dc7299d388f
|
||||||
14
app.json
14
app.json
@ -32,10 +32,6 @@
|
|||||||
"description": "Username of your default admin account",
|
"description": "Username of your default admin account",
|
||||||
"value": "admin"
|
"value": "admin"
|
||||||
},
|
},
|
||||||
"LOGIN_NOTE": {
|
|
||||||
"description": "Note next to login form",
|
|
||||||
"value": "Welcome to your new OhMyForm instance, you can remove this login note in the dyno configuration!"
|
|
||||||
},
|
|
||||||
"ADMIN_PASSWORD": {
|
"ADMIN_PASSWORD": {
|
||||||
"description": "Password for your default admin account",
|
"description": "Password for your default admin account",
|
||||||
"value": ""
|
"value": ""
|
||||||
@ -51,18 +47,10 @@
|
|||||||
"NPM_CONFIG_PRODUCTION": {
|
"NPM_CONFIG_PRODUCTION": {
|
||||||
"description": "Allow Dev Dependencies so we can compile typescript",
|
"description": "Allow Dev Dependencies so we can compile typescript",
|
||||||
"value": "false"
|
"value": "false"
|
||||||
},
|
|
||||||
"DATABASE_DRIVER": {
|
|
||||||
"description": "Database Driver to use",
|
|
||||||
"value": "postgres"
|
|
||||||
},
|
|
||||||
"DATABASE_SSL": {
|
|
||||||
"description": "Use SSL Connection for database",
|
|
||||||
"value": "true"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"addons": [
|
"addons": [
|
||||||
"heroku-postgresql",
|
"mongolab",
|
||||||
"heroku-redis",
|
"heroku-redis",
|
||||||
"mailtrap"
|
"mailtrap"
|
||||||
],
|
],
|
||||||
|
|||||||
@ -7,33 +7,37 @@ version: "3"
|
|||||||
services:
|
services:
|
||||||
redis:
|
redis:
|
||||||
image: redis
|
image: redis
|
||||||
|
mongo:
|
||||||
|
image: mongo
|
||||||
|
volumes:
|
||||||
|
- "./data/mongo:/data/db"
|
||||||
ohmyform:
|
ohmyform:
|
||||||
build: .
|
build: .
|
||||||
environment:
|
environment:
|
||||||
CREATE_ADMIN: "TRUE"
|
CREATE_ADMIN: "TRUE"
|
||||||
|
MONGODB_URI: mongodb://mongo/ohmyform
|
||||||
MAILER_URI: smtp://mail:1025
|
MAILER_URI: smtp://mail:1025
|
||||||
DATABASE_DRIVER: postgres
|
PORT: 5000
|
||||||
DATABASE_URL: postgresql://root:root@db:5432/ohmyform
|
|
||||||
LOGIN_NOTE: "login with root:root!"
|
|
||||||
SECRET_KEY: 12345
|
|
||||||
links:
|
links:
|
||||||
- db
|
- mongo
|
||||||
- redis
|
- redis
|
||||||
- mail
|
- mail
|
||||||
ports:
|
ports:
|
||||||
- "5200:3000"
|
- "5000:5000"
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- mongo
|
||||||
- redis
|
- redis
|
||||||
mail:
|
mail:
|
||||||
image: mailhog/mailhog
|
image: mailhog/mailhog
|
||||||
ports:
|
ports:
|
||||||
- "5051:8025"
|
- "5050:8025"
|
||||||
db:
|
mongoexpress:
|
||||||
image: postgres:10-alpine
|
image: mongo-express
|
||||||
volumes:
|
|
||||||
- ./pg_data:/var/lib/postgresql/data
|
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: root
|
ME_CONFIG_MONGODB_SERVER: mongo
|
||||||
POSTGRES_PASSWORD: root
|
ports:
|
||||||
POSTGRES_DB: ohmyform
|
- "5051:8081"
|
||||||
|
links:
|
||||||
|
- mongo
|
||||||
|
depends_on:
|
||||||
|
- mongo
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
mywebsite.com {
|
|
||||||
reverse_proxy ohmyform:3000
|
|
||||||
}
|
|
||||||
@ -1,41 +0,0 @@
|
|||||||
version: "3.9"
|
|
||||||
|
|
||||||
networks:
|
|
||||||
web:
|
|
||||||
external: true
|
|
||||||
internal:
|
|
||||||
external: false
|
|
||||||
driver: bridge
|
|
||||||
|
|
||||||
services:
|
|
||||||
caddy:
|
|
||||||
container_name: caddy
|
|
||||||
image: caddy:2-alpine
|
|
||||||
restart: unless-stopped
|
|
||||||
ports:
|
|
||||||
- "80:80"
|
|
||||||
- "443:443"
|
|
||||||
volumes:
|
|
||||||
- /data/caddy/Caddyfile:/etc/caddy/Caddyfile
|
|
||||||
- /data/caddy/data:/data # Optional
|
|
||||||
- /data/caddy/config:/config # Optional
|
|
||||||
networks:
|
|
||||||
- web
|
|
||||||
- internal
|
|
||||||
ohmyform:
|
|
||||||
container_name: ohmyform
|
|
||||||
image: ohmyform/ohmyform
|
|
||||||
volumes:
|
|
||||||
- "./data:/data"
|
|
||||||
environment:
|
|
||||||
CREATE_ADMIN: "TRUE"
|
|
||||||
ADMIN_EMAIL: admin@local.host
|
|
||||||
ADMIN_USERNAME: admin
|
|
||||||
ADMIN_PASSWORD: admin
|
|
||||||
DATABASE_DRIVER: sqlite
|
|
||||||
DATABASE_URL: "sqlite:///data/data.sqlite"
|
|
||||||
MAILER_URI: smtp://local.host
|
|
||||||
LOGIN_NOTE: "Either login with admin:admin or create your own account to test OhMyForm"
|
|
||||||
restart: unless-stopped
|
|
||||||
networks:
|
|
||||||
- internal
|
|
||||||
@ -2,24 +2,17 @@ version: "3"
|
|||||||
services:
|
services:
|
||||||
redis:
|
redis:
|
||||||
image: redis
|
image: redis
|
||||||
db:
|
mongo:
|
||||||
image: postgres:10-alpine
|
image: mongo
|
||||||
volumes:
|
volumes:
|
||||||
- ./pg_data:/var/lib/postgresql/data
|
- "./data/mongo:/data/db"
|
||||||
environment:
|
|
||||||
POSTGRES_USER: root
|
|
||||||
POSTGRES_PASSWORD: root
|
|
||||||
POSTGRES_DB: ohmyform
|
|
||||||
restart: unless-stopped
|
|
||||||
ui:
|
ui:
|
||||||
image: ohmyform/ui
|
image: ohmyform/ui
|
||||||
environment:
|
environment:
|
||||||
ENDPOINT: http://localhost:8090/graphql
|
API_HOST: http://localhost:8090/graphql
|
||||||
SERVER_ENDPOINT: http://api:5000/graphql
|
|
||||||
PORT: 5000
|
PORT: 5000
|
||||||
ports:
|
ports:
|
||||||
- "8080:5000"
|
- "8080:5000"
|
||||||
restart: unless-stopped
|
|
||||||
api:
|
api:
|
||||||
image: ohmyform/api
|
image: ohmyform/api
|
||||||
environment:
|
environment:
|
||||||
@ -27,17 +20,16 @@ services:
|
|||||||
ADMIN_EMAIL: admin@local.host
|
ADMIN_EMAIL: admin@local.host
|
||||||
ADMIN_USERNAME: admin
|
ADMIN_USERNAME: admin
|
||||||
ADMIN_PASSWORD: admin
|
ADMIN_PASSWORD: admin
|
||||||
DATABASE_DRIVER: postgres
|
MONGODB_URI: mongodb://mongo/ohmyform
|
||||||
DATABASE_URL: postgresql://root:root@db:5432/ohmyform
|
|
||||||
MAILER_URI: smtp://local.host
|
MAILER_URI: smtp://local.host
|
||||||
REDIS_URL: redis://redis
|
REDIS_URL: redis://redis
|
||||||
PORT: 5000
|
PORT: 5000
|
||||||
links:
|
links:
|
||||||
- db
|
- mongo
|
||||||
- redis
|
- redis
|
||||||
|
- mail
|
||||||
ports:
|
ports:
|
||||||
- "8090:5000"
|
- "8090:5000"
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- mongo
|
||||||
- redis
|
- redis
|
||||||
restart: unless-stopped
|
|
||||||
|
|||||||
@ -1,18 +1,23 @@
|
|||||||
version: "3"
|
version: "3"
|
||||||
services:
|
services:
|
||||||
|
mongo:
|
||||||
|
image: mongo
|
||||||
|
volumes:
|
||||||
|
- "./data/mongo:/data/db"
|
||||||
ohmyform:
|
ohmyform:
|
||||||
image: ohmyform/ohmyform
|
image: ohmyform/ohmyform
|
||||||
volumes:
|
|
||||||
- "./data:/data"
|
|
||||||
environment:
|
environment:
|
||||||
CREATE_ADMIN: "TRUE"
|
CREATE_ADMIN: "TRUE"
|
||||||
ADMIN_EMAIL: admin@local.host
|
ADMIN_EMAIL: admin@local.host
|
||||||
ADMIN_USERNAME: admin
|
ADMIN_USERNAME: admin
|
||||||
ADMIN_PASSWORD: admin
|
ADMIN_PASSWORD: admin
|
||||||
DATABASE_DRIVER: sqlite
|
MONGODB_URI: mongodb://mongo/ohmyform
|
||||||
DATABASE_URL: "sqlite:///data/data.sqlite"
|
|
||||||
MAILER_URI: smtp://local.host
|
MAILER_URI: smtp://local.host
|
||||||
LOGIN_NOTE: "Either login with admin:admin or create your own account to test OhMyForm"
|
PORT: 5000
|
||||||
|
links:
|
||||||
|
- mongo
|
||||||
|
- mail
|
||||||
ports:
|
ports:
|
||||||
- "8080:3000"
|
- "8080:5000"
|
||||||
restart: unless-stopped
|
depends_on:
|
||||||
|
- mongo
|
||||||
|
|||||||
@ -1,14 +1,9 @@
|
|||||||
version: "3"
|
version: "3"
|
||||||
services:
|
services:
|
||||||
db:
|
mongo:
|
||||||
image: postgres:10-alpine
|
image: mongo
|
||||||
volumes:
|
volumes:
|
||||||
- ./pg_data:/var/lib/postgresql/data
|
- "./data/mongo:/data/db"
|
||||||
environment:
|
|
||||||
POSTGRES_USER: root
|
|
||||||
POSTGRES_PASSWORD: root
|
|
||||||
POSTGRES_DB: ohmyform
|
|
||||||
restart: unless-stopped
|
|
||||||
nginx:
|
nginx:
|
||||||
image: nginx:alpine
|
image: nginx:alpine
|
||||||
volumes:
|
volumes:
|
||||||
@ -18,13 +13,10 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- ui
|
- ui
|
||||||
- api
|
- api
|
||||||
restart: unless-stopped
|
|
||||||
ui:
|
ui:
|
||||||
image: ohmyform/ui
|
image: ohmyform/ui
|
||||||
environment:
|
environment:
|
||||||
SERVER_ENDPOINT: http://api:5000/graphql
|
|
||||||
PORT: 5000
|
PORT: 5000
|
||||||
restart: unless-stopped
|
|
||||||
api:
|
api:
|
||||||
image: ohmyform/api
|
image: ohmyform/api
|
||||||
environment:
|
environment:
|
||||||
@ -32,13 +24,11 @@ services:
|
|||||||
ADMIN_EMAIL: admin@local.host
|
ADMIN_EMAIL: admin@local.host
|
||||||
ADMIN_USERNAME: admin
|
ADMIN_USERNAME: admin
|
||||||
ADMIN_PASSWORD: admin
|
ADMIN_PASSWORD: admin
|
||||||
DATABASE_DRIVER: postgres
|
MONGODB_URI: mongodb://mongo/ohmyform
|
||||||
DATABASE_URL: postgresql://root:root@db:5432/ohmyform
|
|
||||||
MAILER_URI: smtp://local.host
|
MAILER_URI: smtp://local.host
|
||||||
REDIS_URL: redis://redis
|
REDIS_URL: redis://redis
|
||||||
PORT: 5000
|
PORT: 5000
|
||||||
links:
|
links:
|
||||||
- db
|
- mongo
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- mongo
|
||||||
restart: unless-stopped
|
|
||||||
|
|||||||
54
nginx.conf
54
nginx.conf
@ -1,54 +0,0 @@
|
|||||||
user nginx;
|
|
||||||
worker_processes 1;
|
|
||||||
error_log /dev/stderr debug;
|
|
||||||
pid /var/run/nginx.pid;
|
|
||||||
|
|
||||||
events {
|
|
||||||
worker_connections 1024;
|
|
||||||
}
|
|
||||||
|
|
||||||
http {
|
|
||||||
log_format json_combined escape=json
|
|
||||||
'{'
|
|
||||||
'"time_local":"$time_local",'
|
|
||||||
'"remote_addr":"$remote_addr",'
|
|
||||||
'"remote_user":"$remote_user",'
|
|
||||||
'"request":"$request",'
|
|
||||||
'"status": "$status",'
|
|
||||||
'"body_bytes_sent":"$body_bytes_sent",'
|
|
||||||
'"request_time":"$request_time",'
|
|
||||||
'"http_referrer":"$http_referer",'
|
|
||||||
'"http_user_agent":"$http_user_agent"'
|
|
||||||
'}';
|
|
||||||
|
|
||||||
access_log /var/log/nginx/access.log json_combined;
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen 3000;
|
|
||||||
|
|
||||||
location / {
|
|
||||||
proxy_pass http://localhost:4000;
|
|
||||||
proxy_redirect off;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /graphql {
|
|
||||||
proxy_pass http://localhost:4100;
|
|
||||||
proxy_redirect off;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
|
|
||||||
# WebSocket support
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection "upgrade";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
"version": "1.0.3",
|
|
||||||
"name": "ohmyform",
|
"name": "ohmyform",
|
||||||
"description": "Opensource alternative to TypeForm",
|
"description": "Opensource alternative to TypeForm",
|
||||||
"homepage": "https://github.com/ohmyform/ohmyform",
|
"homepage": "https://github.com/ohmyform/ohmyform",
|
||||||
@ -10,7 +9,7 @@
|
|||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"yarn": "1.x",
|
"yarn": "1.x",
|
||||||
"node": "^12 || ^14 || ^16"
|
"node": "12.x"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"heroku-prebuild": "scripts/heroku/prebuild.sh",
|
"heroku-prebuild": "scripts/heroku/prebuild.sh",
|
||||||
|
|||||||
@ -1,25 +0,0 @@
|
|||||||
[supervisord]
|
|
||||||
nodaemon=true
|
|
||||||
|
|
||||||
[program:ui]
|
|
||||||
directory=/usr/src/ui
|
|
||||||
command=yarn next start -p 4000
|
|
||||||
stdout_logfile=/dev/fd/1
|
|
||||||
stdout_logfile_maxbytes=0
|
|
||||||
stderr_logfile=/dev/fd/1
|
|
||||||
stderr_logfile_maxbytes=0
|
|
||||||
|
|
||||||
[program:api]
|
|
||||||
directory=/usr/src/api
|
|
||||||
command=yarn start:prod
|
|
||||||
stdout_logfile=/dev/fd/1
|
|
||||||
stdout_logfile_maxbytes=0
|
|
||||||
stderr_logfile=/dev/fd/1
|
|
||||||
stderr_logfile_maxbytes=0
|
|
||||||
|
|
||||||
[program:nginx]
|
|
||||||
command=nginx -g "daemon off;"
|
|
||||||
stdout_logfile=/dev/fd/1
|
|
||||||
stdout_logfile_maxbytes=0
|
|
||||||
stderr_logfile=/dev/fd/1
|
|
||||||
stderr_logfile_maxbytes=0
|
|
||||||
2
ui
2
ui
@ -1 +1 @@
|
|||||||
Subproject commit 011a6baef416bb9265f5172707bc21e7823c8086
|
Subproject commit e124aa1d676d03a68fc15353b44898e75ef2b398
|
||||||
Loading…
x
Reference in New Issue
Block a user