Tutorial budibase docker with ssl and client_max_body_size #10506
harmkroog
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, ive creted an docker compose with nginx to get https too.
For "username" replace it with you username of course
we create three folders
mkdir -p /home/username/budibasedata
mkdir -p /home/username/budibasedockertemplate
mkdir -p /home/username/budibasedockertemplate/certs
First create the certs. If you wish fewer dayr correct them. I hate it to recreate self signed certs. that wyh i add 3 zero to 356 days.
cd /home/username/budibasedockertemplate/certs openssl req -newkey rsa:4096 -x509 -sha256 -days 365000 -nodes -out selfsigned.crt -keyout private.key
now create the nginx-proxy.conf in the template folder
nano nginx-proxy.conf
`events {
worker_connections 1024;
}
http {
server {
listen 80;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
ssl_certificate /etc/ssl/certs/selfsigned.crt;
ssl_certificate_key /etc/ssl/private/private.key;
}
}`
The param client_max_body_size 100M; defines max upload size. decrease it if you need more
now create in the template folder the docker file
nano docker-compose.yml
`version: "3"
services:
budibase:
restart: unless-stopped
image: budibase/budibase:latest
ports:
- "80:80"
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:80/"]
interval: 30s
timeout: 10s
retries: 3
volumes:
- budibase_data:/data
nginx:
image: nginx:stable
container_name: nginx-proxy
volumes:
- ./nginx-proxy.conf:/etc/nginx/nginx.conf:ro
- ./certs/selfsigned.crt:/etc/ssl/certs/selfsigned.crt:ro
- ./certs/private.key:/etc/ssl/private/private.key:ro
ports:
- "8080:80"
- "443:443"
depends_on:
- budibase
restart: unless-stopped
volumes:
budibase_data:
driver: local
driver_opts:
type: none
o: bind
device: /home/username/budibasedata
`
Now we get an buibase container with https and big upload size.
Without the upload size i could not import my app again.
Now it works.
I hope you can use it
The format in the Post not working.
Ive uploaded the two files in this post
docker_and_nginx_conf.zip
Beta Was this translation helpful? Give feedback.
All reactions