add a few more examples
This commit is contained in:
parent
f5e31b78aa
commit
8616f69ff6
26
examples/docker_for_load_balancing/README.md
Normal file
26
examples/docker_for_load_balancing/README.md
Normal 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.
|
||||
|
||||
35
examples/docker_for_load_balancing/docker-compose.yml
Normal file
35
examples/docker_for_load_balancing/docker-compose.yml
Normal 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
|
||||
10
examples/docker_minimal/README.md
Normal file
10
examples/docker_minimal/README.md
Normal 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.
|
||||
23
examples/docker_minimal/docker-compose.yml
Normal file
23
examples/docker_minimal/docker-compose.yml
Normal 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
|
||||
9
examples/docker_nginx/README.md
Normal file
9
examples/docker_nginx/README.md
Normal 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.
|
||||
16
examples/docker_nginx/default.conf
Normal file
16
examples/docker_nginx/default.conf
Normal 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;
|
||||
}
|
||||
}
|
||||
31
examples/docker_nginx/docker-compose.yml
Normal file
31
examples/docker_nginx/docker-compose.yml
Normal 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
|
||||
Loading…
x
Reference in New Issue
Block a user