Some minor changes to get nginx up and running in front of minio correctly.

This commit is contained in:
mike12345567 2020-12-16 16:02:36 +00:00
parent 9162aa522b
commit ca3886af4a
3 changed files with 20 additions and 14 deletions

View File

@ -6,15 +6,16 @@ services:
volumes: volumes:
- ./server:/app - ./server:/app
ports: ports:
- "4001:4001" - "${APP_PORT}:${APP_PORT}"
environment: environment:
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY} MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY} MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
MINIO_URL: http://minio-service:9000 MINIO_URL: http://nginx-service:${MINIO_PORT}
SELF_HOSTED: 1 SELF_HOSTED: 1
COUCH_DB_URL: http://${COUCH_DB_USER}:${COUCH_DB_PASSWORD}@couchdb-service:5984 COUCH_DB_URL: http://${COUCH_DB_USER}:${COUCH_DB_PASSWORD}@couchdb-service:5984
BUDIBASE_ENVIRONMENT: ${BUDIBASE_ENVIRONMENT} BUDIBASE_ENVIRONMENT: ${BUDIBASE_ENVIRONMENT}
LOGO_URL: ${LOGO_URL} LOGO_URL: ${LOGO_URL}
PORT: ${APP_PORT}
depends_on: depends_on:
- nginx-service - nginx-service
- minio-service - minio-service
@ -24,8 +25,8 @@ services:
image: minio/minio:RELEASE.2020-12-10T01-54-29Z image: minio/minio:RELEASE.2020-12-10T01-54-29Z
volumes: volumes:
- data1:/data - data1:/data
expose: ports:
- "9000" - "9000:9000"
environment: environment:
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY} MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY} MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
@ -39,11 +40,12 @@ services:
nginx-service: nginx-service:
image: nginx:1.19.2-alpine image: nginx:1.19.2-alpine
volumes: volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro - ./nginx.template:/etc/nginx/nginx.template:ro
ports: ports:
- "9000:9000" - "${MINIO_PORT}:5001"
depends_on: depends_on:
- minio-service - minio-service
command: ["sh", "-c", "envsubst < /etc/nginx/nginx.template > /etc/nginx/nginx.conf && nginx -g 'daemon off;'"]
couchdb-service: couchdb-service:
image: apache/couchdb:3.0 image: apache/couchdb:3.0
@ -51,7 +53,7 @@ services:
- COUCHDB_PASSWORD=${COUCH_DB_PASSWORD} - COUCHDB_PASSWORD=${COUCH_DB_PASSWORD}
- COUCHDB_USER=${COUCH_DB_USER} - COUCHDB_USER=${COUCH_DB_USER}
ports: ports:
- "5984:5984" - "${COUCH_DB_PORT}:5984"
- "4369:4369" - "4369:4369"
- "9100:9100" - "9100:9100"
volumes: volumes:
@ -59,9 +61,11 @@ services:
couch-init: couch-init:
image: curlimages/curl image: curlimages/curl
environment:
PUT_CALL: "curl -u ${COUCH_DB_USER}:${COUCH_DB_PASSWORD} -X PUT couchdb-service:5984"
depends_on: depends_on:
- couchdb-service - couchdb-service
command: ["sh","-c","sleep 10 && curl -u ${COUCH_DB_USER}:${COUCH_DB_PASSWORD} -X PUT couchdb-service:5984/_users && curl -u ${COUCH_DB_USER}:${COUCH_DB_PASSWORD} -X PUT couchdb-service:5984/_replicator; fg ; "] command: ["sh","-c","sleep 10 && $${PUT_CALL}/_users && $${PUT_CALL}/_replicator; fg;"]
volumes: volumes:
couchdb_data: couchdb_data:

View File

@ -5,3 +5,6 @@ COUCH_DB_USER=budibase
BUDIBASE_ENVIRONMENT=PRODUCTION BUDIBASE_ENVIRONMENT=PRODUCTION
HOSTING_URL="http://localhost:4001" HOSTING_URL="http://localhost:4001"
LOGO_URL=https://logoipsum.com/logo/logo-15.svg LOGO_URL=https://logoipsum.com/logo/logo-15.svg
APP_PORT=4002
MINIO_PORT=4003
COUCH_DB_PORT=4004

View File

@ -31,19 +31,18 @@ http {
# include /etc/nginx/conf.d/*.conf; # include /etc/nginx/conf.d/*.conf;
upstream minio { upstream minio {
server minio:9000; # if adding more minio services to cluster add them here
server minio-service:9000;
} }
server { server {
listen 9000; listen 5001;
listen [::]:9000; listen [::]:5001;
server_name localhost; server_name localhost;
# To allow special characters in headers # To allow special characters in headers
ignore_invalid_headers off; ignore_invalid_headers off;
# Allow any size file to be uploaded. client_max_body_size 100m;
# Set to a value such as 1000m; to restrict file size to a specific value
client_max_body_size 0;
# To disable buffering # To disable buffering
proxy_buffering off; proxy_buffering off;