Compare commits

...

66 Commits

Author SHA1 Message Date
Leopere
42050dc078
Update README.md
updated demo url
2023-10-13 13:49:50 -04:00
Michael Schramm
ffe74eafcd
Merge pull request #182 from ru2saig/master
Updated install link for node-prune
2023-08-25 12:18:35 +02:00
Michael Schramm
10db1541c2 fix node prune location
fixes https://github.com/ohmyform/ohmyform/issues/184
2022-07-28 08:02:14 +02:00
Michael Schramm
2a9ef35ef2
Update CHANGELOG.md 2022-07-04 14:09:47 +02:00
Michael Schramm
405fb04ce6
Merge pull request #185 from joebailey26/patch-1
Fixed typo
2022-07-04 14:08:28 +02:00
Joe Bailey
a7d64bac79
Fixed typo 2022-06-09 09:03:09 +01:00
ru2saig
ee962f9afa Updated install link for node-prune 2022-05-23 00:49:08 +05:30
Michael Schramm
bef2eb7344 release 1.0.3 2022-03-27 20:24:54 +02:00
Michael Schramm
ed3d0e7392 release 1.0.3 2022-03-27 20:24:28 +02:00
Michael Schramm
deb81d2164
Update CHANGELOG.md 2022-03-16 16:32:17 +01:00
Michael Schramm
b6c651e47f
Merge pull request #167 from spencerflagg/master
Added minimal config example for Caddy server
2022-03-16 16:31:39 +01:00
Spencer Flagg
9887d1a898
Added minimal config example for Caddy server 2022-03-16 14:52:57 +01:00
Michael Schramm
701f43c98f release 1.0.2 2022-03-13 23:48:01 +01:00
Michael Schramm
912be0bc38 changed docker restart policy 2022-03-13 23:39:46 +01:00
Michael Schramm
9c58d92aee release 1.0.1 2022-03-01 23:43:45 +01:00
Michael Schramm
2cd3bd0e1d fix docker build 2022-02-28 09:08:10 +01:00
Michael Schramm
13ceb1fe52 add libc6-compat 2022-02-28 08:41:42 +01:00
Michael Schramm
6c34e65c3b upgrade to node 16 2022-02-28 08:37:52 +01:00
Michael Schramm
17ce7328bb update changelog for version 1.0.0 2022-02-28 08:34:29 +01:00
Michael Schramm
30de61172a update submodules 2022-02-13 23:14:24 +01:00
Michael Schramm
d3ec553b33 update submodules 2022-02-13 22:37:48 +01:00
Michael Schramm
4537b35c6b fix combined image 2022-01-13 16:47:35 +01:00
Michael Schramm
3ad5c4e86b update to latest api 2022-01-13 14:50:00 +01:00
Michael Schramm
2e47aaf645 update ui to latest 2022-01-03 20:19:09 +01:00
Michael Schramm
5ac5d3a6be update github actions 2022-01-03 14:36:47 +01:00
Michael Schramm
8de3d59d04 update github actions 2022-01-03 14:34:16 +01:00
Michael Schramm
bf575badb0 test new tags 2022-01-03 13:08:34 +01:00
Michael Schramm
3fcde897b7 update api and ui and fix env 2022-01-03 00:58:36 +01:00
Michael Schramm
52ddbc72f7
Merge pull request #148 from real-or-random/patch-1
don't mkdir /run/nginx if it exists
2022-01-02 16:16:35 +01:00
Tim Ruffing
1866b3054c
don't mkdir /run/nginx if it exists
Fixes #147.
2021-12-07 23:40:15 +01:00
Michael Schramm
4eb162b8e0 fix example env variable names
https://github.com/ohmyform/ohmyform/issues/134
2021-05-07 00:32:49 +02:00
Michael Schramm
feff3056a5 fix problem with node-prune on production build 2021-05-06 20:12:03 +02:00
Michael Schramm
e05c36c26a update ui to include improvements on api connection error and side menu once logged in 2021-05-04 18:31:19 +02:00
Michael Schramm
596999193a update api to apply version fix 2021-05-04 18:06:36 +02:00
Michael Schramm
d71bd22924 upgrade refs to latest version 2021-05-02 18:38:15 +02:00
Michael Schramm
a4454fa6ad update minimal example to not even require db 2021-05-02 18:37:46 +02:00
Michael Schramm
861b6aa951 update texts 2021-05-02 16:26:28 +02:00
Michael Schramm
5414f3b371 - switched to supervisord based combined container
- heroku deployments
2021-05-02 15:53:01 +02:00
Michael Schramm
46760ae135 remove email and password from heroku deploy 2021-05-02 14:07:35 +02:00
Michael Schramm
fa11cb1214 theoretical fix for heroku deployments 2021-05-02 14:04:25 +02:00
Michael Schramm
97441902a6 update ref to release 0.9.9 2021-02-14 14:20:04 +01:00
Michael Schramm
6ef9b8e52c
Merge pull request #120 from patcon/patch-1
Correct opencollective Sponsor link.
2021-01-07 07:19:12 +01:00
Patrick Connolly
27682231b7
Correct opencollective Sponsor link. 2020-11-15 14:04:30 -05:00
Michael Schramm
ca5e5a7714
Update CHANGELOG.md 2020-10-09 08:59:15 +02:00
Michael Schramm
adafe06c11
Merge pull request #118 from kmjayadeep/node-upgrade
upgrade node version to 14
2020-10-09 08:57:36 +02:00
Jayadeep KM
17c09b0853 add vesion 12 and 14 to node engine in package.json 2020-10-09 12:25:50 +05:30
Jayadeep KM
9ee877f3e6 upgrade node version for api and ui 2020-10-09 12:09:20 +05:30
Jayadeep KM
46816290fc upgrade node production and build stage versions to 14 2020-10-09 11:48:37 +05:30
Jayadeep KM
79e25a6d52 upgrade node version to 14 2020-10-09 11:46:09 +05:30
Michael Schramm
e4a9088014 fix dependency 2020-09-18 17:34:14 +02:00
Michael Schramm
7b4b772acc fix dependency 2020-09-18 17:29:42 +02:00
Michael Schramm
04dd4abb77 prepare 0.9.8 release 2020-09-02 11:31:32 +02:00
Michael Schramm
4387f48dc8 prepare 0.9.8 release 2020-09-02 11:26:25 +02:00
Michael Schramm
6e1f2b7edb update changelog for 0.9.6 2020-07-17 10:39:15 +02:00
Leopere
6e7194d64b
Correcting FUNDING.yml 2020-07-08 10:05:17 -04:00
Michael Schramm
59d59eb048 reduce docker layer size 2020-06-16 10:45:52 +02:00
Michael Schramm
034da458be
Merge pull request #98 from jmhbnz/master
Switched to non root user
2020-06-16 09:25:07 +02:00
James Blair
c6360ce3be Corrected ownership of schema file. 2020-06-16 19:18:21 +12:00
James Blair
d67a780185 Reverted "Corrected ownership of schema file."
This reverts commit b36a73afdb8ced00c7f1764de541ebf8f8868806.
2020-06-16 19:15:58 +12:00
James Blair
b36a73afdb Corrected ownership of schema file. 2020-06-16 19:12:18 +12:00
James Blair
97af16862a Applied #97 suggested dockerfile. 2020-06-16 18:52:24 +12:00
James Blair
961ff38eb5 Switched to non root user and alpine. 2020-06-16 18:21:17 +12:00
Michael Schramm
4d27b928d8 update changelog 2020-06-11 18:31:15 +02:00
Michael Schramm
e72dcbda9f add demo links and fix setting.service 2020-06-11 12:15:31 +02:00
Michael Schramm
5be5edcc71 add link to dockerhub 2020-06-11 10:42:01 +02:00
Michael Schramm
17908af385 add changelog for 0.9.4 release 2020-06-09 18:22:09 +02:00
20 changed files with 546 additions and 83 deletions

View File

@ -5,6 +5,7 @@ data
docker docker
node_modules node_modules
selenium selenium
examples
.all-contributorsrc .all-contributorsrc
.csslintrc .csslintrc
.editorconfig .editorconfig
@ -18,3 +19,11 @@ 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
View File

@ -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 open_collective: ohmyform-sustainability
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 Normal file
View File

@ -0,0 +1,45 @@
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
View File

@ -61,6 +61,9 @@ local.properties
.c9/ .c9/
data/ data/
mongod mongod
pg_data
maria
*.sqlite
# General # General
# ======= # =======

View File

@ -4,13 +4,216 @@ 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

View File

@ -13,6 +13,10 @@
<!-- /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.

View File

@ -1,30 +1,73 @@
FROM node:12 as builder ## Build UI
FROM node:16-alpine as ui
WORKDIR /usr/src/app WORKDIR /usr/src/ui
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 export RUN yarn build
FROM node:12 # remove development dependencies
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/app WORKDIR /usr/src/api
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
ENV PORT=3000 \ # remove development dependencies
SECRET_KEY=ChangeMe \ RUN npm prune --production
# 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
CMD [ "yarn", "start:prod" ] RUN mkdir -p /run/nginx/
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" ]

View File

@ -4,12 +4,14 @@
![Project Status](https://badgen.net/github/checks/ohmyform/ohmyform) ![Project Status](https://badgen.net/github/checks/ohmyform/ohmyform)
![Latest Release](https://badgen.net/github/tag/ohmyform/ohmyform) ![Latest Release](https://badgen.net/github/tag/ohmyform/ohmyform)
![Docker Pulls](https://badgen.net/docker/pulls/ohmyform/ohmyform) [![Docker Pulls](https://badgen.net/docker/pulls/ohmyform/ohmyform)](https://hub.docker.com/r/ohmyform/ohmyform)
[![Lokalise](https://badgen.net/badge/Lokalise/EN/green?icon=libraries)](https://app.lokalise.com/public/379418475ede5d5c6937b0.31012044/) [![Lokalise](https://badgen.net/badge/Lokalise/EN/green?icon=libraries)](https://app.lokalise.com/public/379418475ede5d5c6937b0.31012044/)
![Last Commit](https://badgen.net/github/last-commit/ohmyform/ohmyform) ![Last Commit](https://badgen.net/github/last-commit/ohmyform/ohmyform)
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/ohmyform/ohmyform/tree/master) [![Deploy](https://www.herokucdn.com/deploy/button.svg)](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.
[![Discord](https://img.shields.io/discord/595773457862492190.svg?label=Discord%20Chat)](https://discord.gg/MJqAuAZ) [![Discord](https://img.shields.io/discord/595773457862492190.svg?label=Discord%20Chat)](https://discord.gg/MJqAuAZ)
@ -22,8 +24,7 @@
- [OhMyForm](#ohmyform-091) - [OhMyForm](#ohmyform-091)
- [Table of Contents](#table-of-contents) - [Table of Contents](#table-of-contents)
- [Features](#features) - [Features](#features)
- [Currently following features are implemented:](#currently-following-features-are-implemented) - [On the Roadmap](#on-the-roadmap)
- [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)
@ -32,29 +33,30 @@
## Features ## Features
### Currently following features are implemented: - Multi-Language Support
- 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 (ala Slack) - Add plugin/3rd party integration support (aka 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.
@ -67,7 +69,13 @@ 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
@ -90,7 +98,7 @@ Become a financial contributor and help us sustain our community. [[Contribute](
#### Individuals #### Individuals
[![Individuals](https://opencollective.com/static/images/opencollective-og-default.png?width=890)](https://opencollective.com/ohmyform-sustainability) [![Individuals](https://opencollective.com/static/images/opencollective-og-default.png)](https://opencollective.com/ohmyform-sustainability)
#### Organizations #### Organizations
@ -99,4 +107,7 @@ Support this project with your organization. Your logo will show up here with a
[![](https://opencollective.com/ohmyform-sustainability/organization/0/avatar.svg)](https://opencollective.com/ohmyform-sustainability/organization/0/website) [![](https://opencollective.com/ohmyform-sustainability/organization/0/avatar.svg)](https://opencollective.com/ohmyform-sustainability/organization/0/website)
[![](https://opencollective.com/ohmyform-sustainability/organization/1/avatar.svg)](https://opencollective.com/ohmyform-sustainability/organization/1/website) [![](https://opencollective.com/ohmyform-sustainability/organization/1/avatar.svg)](https://opencollective.com/ohmyform-sustainability/organization/1/website)
[![](https://opencollective.com/ohmyform-sustainability/organization/2/avatar.svg)](https://opencollective.com/ohmyform-sustainability/organization/2/website) [![](https://opencollective.com/ohmyform-sustainability/organization/2/avatar.svg)](https://opencollective.com/ohmyform-sustainability/organization/2/website)
[![](https://opencollective.com/ohmyform-sustainability/organization/3/avatar.svg)](https://opencollective.com/ohmyform-sustainability/organization/2/website)
[![](https://opencollective.com/ohmyform-sustainability/organization/4/avatar.svg)](https://opencollective.com/ohmyform-sustainability/organization/2/website)
[![](https://opencollective.com/ohmyform-sustainability/organization/5/avatar.svg)](https://opencollective.com/ohmyform-sustainability/organization/2/website)

2
api

@ -1 +1 @@
Subproject commit 522db49d0ad3543d849d7a7e44df6dc7299d388f Subproject commit c2c421baa6f41e4e6fb812fa2978956aaf7aa0dd

View File

@ -32,6 +32,10 @@
"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": ""
@ -47,10 +51,18 @@
"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": [
"mongolab", "heroku-postgresql",
"heroku-redis", "heroku-redis",
"mailtrap" "mailtrap"
], ],

View File

@ -7,37 +7,33 @@ 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
PORT: 5000 DATABASE_DRIVER: postgres
DATABASE_URL: postgresql://root:root@db:5432/ohmyform
LOGIN_NOTE: "login with root:root!"
SECRET_KEY: 12345
links: links:
- mongo - db
- redis - redis
- mail - mail
ports: ports:
- "5000:5000" - "5200:3000"
depends_on: depends_on:
- mongo - db
- redis - redis
mail: mail:
image: mailhog/mailhog image: mailhog/mailhog
ports: ports:
- "5050:8025" - "5051:8025"
mongoexpress: db:
image: mongo-express image: postgres:10-alpine
volumes:
- ./pg_data:/var/lib/postgresql/data
environment: environment:
ME_CONFIG_MONGODB_SERVER: mongo POSTGRES_USER: root
ports: POSTGRES_PASSWORD: root
- "5051:8081" POSTGRES_DB: ohmyform
links:
- mongo
depends_on:
- mongo

View File

@ -0,0 +1,3 @@
mywebsite.com {
reverse_proxy ohmyform:3000
}

View File

@ -0,0 +1,41 @@
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

View File

@ -2,17 +2,24 @@ version: "3"
services: services:
redis: redis:
image: redis image: redis
mongo: db:
image: mongo image: postgres:10-alpine
volumes: volumes:
- "./data/mongo:/data/db" - ./pg_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
POSTGRES_DB: ohmyform
restart: unless-stopped
ui: ui:
image: ohmyform/ui image: ohmyform/ui
environment: environment:
API_HOST: http://localhost:8090/graphql ENDPOINT: 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:
@ -20,16 +27,17 @@ services:
ADMIN_EMAIL: admin@local.host ADMIN_EMAIL: admin@local.host
ADMIN_USERNAME: admin ADMIN_USERNAME: admin
ADMIN_PASSWORD: admin ADMIN_PASSWORD: admin
MONGODB_URI: mongodb://mongo/ohmyform DATABASE_DRIVER: postgres
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:
- mongo - db
- redis - redis
- mail
ports: ports:
- "8090:5000" - "8090:5000"
depends_on: depends_on:
- mongo - db
- redis - redis
restart: unless-stopped

View File

@ -1,23 +1,18 @@
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
MONGODB_URI: mongodb://mongo/ohmyform DATABASE_DRIVER: sqlite
DATABASE_URL: "sqlite:///data/data.sqlite"
MAILER_URI: smtp://local.host MAILER_URI: smtp://local.host
PORT: 5000 LOGIN_NOTE: "Either login with admin:admin or create your own account to test OhMyForm"
links:
- mongo
- mail
ports: ports:
- "8080:5000" - "8080:3000"
depends_on: restart: unless-stopped
- mongo

View File

@ -1,9 +1,14 @@
version: "3" version: "3"
services: services:
mongo: db:
image: mongo image: postgres:10-alpine
volumes: volumes:
- "./data/mongo:/data/db" - ./pg_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
POSTGRES_DB: ohmyform
restart: unless-stopped
nginx: nginx:
image: nginx:alpine image: nginx:alpine
volumes: volumes:
@ -13,10 +18,13 @@ 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:
@ -24,11 +32,13 @@ services:
ADMIN_EMAIL: admin@local.host ADMIN_EMAIL: admin@local.host
ADMIN_USERNAME: admin ADMIN_USERNAME: admin
ADMIN_PASSWORD: admin ADMIN_PASSWORD: admin
MONGODB_URI: mongodb://mongo/ohmyform DATABASE_DRIVER: postgres
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:
- mongo - db
depends_on: depends_on:
- mongo - db
restart: unless-stopped

54
nginx.conf Normal file
View File

@ -0,0 +1,54 @@
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";
}
}
}

View File

@ -1,4 +1,5 @@
{ {
"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",
@ -9,7 +10,7 @@
}, },
"engines": { "engines": {
"yarn": "1.x", "yarn": "1.x",
"node": "12.x" "node": "^12 || ^14 || ^16"
}, },
"scripts": { "scripts": {
"heroku-prebuild": "scripts/heroku/prebuild.sh", "heroku-prebuild": "scripts/heroku/prebuild.sh",

25
supervisord.conf Normal file
View File

@ -0,0 +1,25 @@
[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

@ -1 +1 @@
Subproject commit e124aa1d676d03a68fc15353b44898e75ef2b398 Subproject commit 011a6baef416bb9265f5172707bc21e7823c8086