add a few more examples

This commit is contained in:
Michael Schramm 2020-06-04 11:48:33 +02:00
parent f5e31b78aa
commit 8616f69ff6
7 changed files with 150 additions and 0 deletions

View File

@ -0,0 +1,26 @@
# Load Balancing Config
## Required changes
`MAILER_URI` should be set to allow emails to be sent.
Further you have to setup a Load Balancer (more in the Configuration section)
## Configuration
for this setup it is important to have either an
ingress server that does load balancing on paths
or to expose the api on a different host.
If you expose the api on a different host do not forget
to change the API_HOST env variable on the ui
container to route the requests properly.
# AWS Cloudfront Ingress
both ui and api would run behind a load balancer.
the default path should then be routed to the ui container
and the /graphql path to the api container.

View File

@ -0,0 +1,35 @@
version: "3"
services:
redis:
image: redis
mongo:
image: mongo
volumes:
- "./data/mongo:/data"
ui:
image: ohmyform/ui
environment:
API_HOST: http://localhost:8090/graphql
PORT: 5000
ports:
- "8080:5000"
api:
image: ohmyform/api
environment:
CREATE_ADMIN: "true"
ADMIN_EMAIL: admin@local.host
ADMIN_USERNAME: admin
ADMIN_PASSWORD: admin
MONGODB_URI: mongodb://mongo/ohmyform
MAILER_URI: smtp://local.host
REDIS_URL: redis://redis
PORT: 5000
links:
- mongo
- redis
- mail
ports:
- "8090:5000"
depends_on:
- mongo
- redis

View File

@ -0,0 +1,10 @@
# Minimal Config
will start one omf container with mongodb, persisting data.
after startup you can access it at *:8080
## Required changes
`MAILER_URI` should be set to allow emails to be sent.

View File

@ -0,0 +1,23 @@
version: "3"
services:
mongo:
image: mongo
volumes:
- "./data/mongo:/data"
ohmyform:
image: ohmyform/ohmyform
environment:
CREATE_ADMIN: "TRUE"
ADMIN_EMAIL: admin@local.host
ADMIN_USERNAME: admin
ADMIN_PASSWORD: admin
MONGODB_URI: mongodb://mongo/ohmyform
MAILER_URI: smtp://local.host
PORT: 5000
links:
- mongo
- mail
ports:
- "8080:5000"
depends_on:
- mongo

View File

@ -0,0 +1,9 @@
# Nginx Config
ServerSideRendering for the UI with configured Reverse Proxy (Nginx)
after startup you can access your page at *:8080, forms will be persisted between docker runs
## Required changes
`MAILER_URI` should be set to allow emails to be sent.

View File

@ -0,0 +1,16 @@
server {
listen 80;
location / {
proxy_pass http://ui:5000;
proxy_redirect off;
proxy_set_header Host $host;
}
location /graphql {
proxy_pass http://api:5000;
proxy_redirect off;
proxy_set_header Host $host;
}
}

View File

@ -0,0 +1,31 @@
version: "3"
services:
mongo:
image: mongo
volumes:
- "./data/mongo:/data"
nginx:
image: nginx:alpine
volumes:
- "./default.conf:/etc/nginx/conf.d/default.conf"
ports:
- "8080:80"
ui:
image: ohmyform/ui
environment:
PORT: 5000
api:
image: ohmyform/api
environment:
CREATE_ADMIN: "true"
ADMIN_EMAIL: admin@local.host
ADMIN_USERNAME: admin
ADMIN_PASSWORD: admin
MONGODB_URI: mongodb://mongo/ohmyform
MAILER_URI: smtp://local.host
REDIS_URL: redis://redis
PORT: 5000
links:
- mongo
depends_on:
- mongo