Merge branch 'develop' of github.com:Budibase/budibase into table-cell-config
This commit is contained in:
commit
f1209f30de
44 changed files with 244 additions and 1113 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -65,6 +65,7 @@ typings/
|
||||||
.env
|
.env
|
||||||
!hosting/.env
|
!hosting/.env
|
||||||
hosting/.generated-nginx.dev.conf
|
hosting/.generated-nginx.dev.conf
|
||||||
|
hosting/proxy/.generated-nginx.prod.conf
|
||||||
|
|
||||||
# parcel-bundler cache (https://parceljs.org/)
|
# parcel-bundler cache (https://parceljs.org/)
|
||||||
.cache
|
.cache
|
||||||
|
|
|
@ -11,7 +11,7 @@ sources:
|
||||||
- https://github.com/Budibase/budibase
|
- https://github.com/Budibase/budibase
|
||||||
- https://budibase.com
|
- https://budibase.com
|
||||||
type: application
|
type: application
|
||||||
version: 0.2.6
|
version: 0.2.8
|
||||||
appVersion: 1.0.48
|
appVersion: 1.0.48
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: couchdb
|
- name: couchdb
|
||||||
|
|
|
@ -25,7 +25,7 @@ spec:
|
||||||
app.kubernetes.io/name: budibase-proxy
|
app.kubernetes.io/name: budibase-proxy
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- image: budibase/proxy:k8s
|
- image: budibase/proxy:{{ .Values.services.proxy.tag | default "k8s" }}
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
name: proxy-service
|
name: proxy-service
|
||||||
ports:
|
ports:
|
||||||
|
|
|
@ -100,6 +100,9 @@ globals:
|
||||||
cookieDomain: ""
|
cookieDomain: ""
|
||||||
platformUrl: ""
|
platformUrl: ""
|
||||||
httpMigrations: "0"
|
httpMigrations: "0"
|
||||||
|
google:
|
||||||
|
clientId: ""
|
||||||
|
secret: ""
|
||||||
|
|
||||||
createSecrets: true # creates an internal API key, JWT secrets and redis password for you
|
createSecrets: true # creates an internal API key, JWT secrets and redis password for you
|
||||||
|
|
||||||
|
@ -124,7 +127,7 @@ services:
|
||||||
logLevel: info
|
logLevel: info
|
||||||
|
|
||||||
worker:
|
worker:
|
||||||
port: 4001
|
port: 4003
|
||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
|
|
||||||
couchdb:
|
couchdb:
|
||||||
|
|
|
@ -7,8 +7,6 @@ services:
|
||||||
restart: always
|
restart: always
|
||||||
image: budibase.docker.scarf.sh/budibase/apps
|
image: budibase.docker.scarf.sh/budibase/apps
|
||||||
container_name: bbapps
|
container_name: bbapps
|
||||||
ports:
|
|
||||||
- "${APP_PORT}:4002"
|
|
||||||
environment:
|
environment:
|
||||||
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
|
||||||
|
@ -25,8 +23,6 @@ services:
|
||||||
ENABLE_ANALYTICS: "true"
|
ENABLE_ANALYTICS: "true"
|
||||||
REDIS_URL: redis-service:6379
|
REDIS_URL: redis-service:6379
|
||||||
REDIS_PASSWORD: ${REDIS_PASSWORD}
|
REDIS_PASSWORD: ${REDIS_PASSWORD}
|
||||||
volumes:
|
|
||||||
- ./logs:/logs
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- worker-service
|
- worker-service
|
||||||
- redis-service
|
- redis-service
|
||||||
|
@ -35,8 +31,6 @@ services:
|
||||||
restart: always
|
restart: always
|
||||||
image: budibase.docker.scarf.sh/budibase/worker
|
image: budibase.docker.scarf.sh/budibase/worker
|
||||||
container_name: bbworker
|
container_name: bbworker
|
||||||
ports:
|
|
||||||
- "${WORKER_PORT}:4003"
|
|
||||||
environment:
|
environment:
|
||||||
SELF_HOSTED: 1
|
SELF_HOSTED: 1
|
||||||
PORT: 4003
|
PORT: 4003
|
||||||
|
@ -53,8 +47,6 @@ services:
|
||||||
INTERNAL_API_KEY: ${INTERNAL_API_KEY}
|
INTERNAL_API_KEY: ${INTERNAL_API_KEY}
|
||||||
REDIS_URL: redis-service:6379
|
REDIS_URL: redis-service:6379
|
||||||
REDIS_PASSWORD: ${REDIS_PASSWORD}
|
REDIS_PASSWORD: ${REDIS_PASSWORD}
|
||||||
volumes:
|
|
||||||
- ./logs:/logs
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis-service
|
- redis-service
|
||||||
- minio-service
|
- minio-service
|
||||||
|
@ -65,8 +57,6 @@ services:
|
||||||
image: minio/minio
|
image: minio/minio
|
||||||
volumes:
|
volumes:
|
||||||
- minio_data:/data
|
- minio_data:/data
|
||||||
ports:
|
|
||||||
- "${MINIO_PORT}: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}
|
||||||
|
@ -80,10 +70,10 @@ services:
|
||||||
|
|
||||||
proxy-service:
|
proxy-service:
|
||||||
restart: always
|
restart: always
|
||||||
container_name: bbproxy
|
|
||||||
image: budibase/proxy
|
|
||||||
ports:
|
ports:
|
||||||
- "${MAIN_PORT}:10000"
|
- "${MAIN_PORT}:10000"
|
||||||
|
container_name: bbproxy
|
||||||
|
image: budibase/proxy
|
||||||
depends_on:
|
depends_on:
|
||||||
- minio-service
|
- minio-service
|
||||||
- worker-service
|
- worker-service
|
||||||
|
@ -96,8 +86,6 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- COUCHDB_PASSWORD=${COUCH_DB_PASSWORD}
|
- COUCHDB_PASSWORD=${COUCH_DB_PASSWORD}
|
||||||
- COUCHDB_USER=${COUCH_DB_USER}
|
- COUCHDB_USER=${COUCH_DB_USER}
|
||||||
ports:
|
|
||||||
- "${COUCH_DB_PORT}:5984"
|
|
||||||
volumes:
|
volumes:
|
||||||
- couchdb3_data:/opt/couchdb/data
|
- couchdb3_data:/opt/couchdb/data
|
||||||
|
|
||||||
|
@ -113,15 +101,11 @@ services:
|
||||||
restart: always
|
restart: always
|
||||||
image: redis
|
image: redis
|
||||||
command: redis-server --requirepass ${REDIS_PASSWORD}
|
command: redis-server --requirepass ${REDIS_PASSWORD}
|
||||||
ports:
|
|
||||||
- "${REDIS_PORT}:6379"
|
|
||||||
volumes:
|
volumes:
|
||||||
- redis_data:/data
|
- redis_data:/data
|
||||||
|
|
||||||
watchtower-service:
|
watchtower-service:
|
||||||
image: containrrr/watchtower
|
image: containrrr/watchtower
|
||||||
ports:
|
|
||||||
- "${WATCHTOWER_PORT}:8080"
|
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
command: --debug --http-api-update bbapps bbworker bbproxy
|
command: --debug --http-api-update bbapps bbworker bbproxy
|
||||||
|
|
21
hosting/hosting.properties
Normal file
21
hosting/hosting.properties
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# Use the main port in the builder for your self hosting URL, e.g. localhost:10000
|
||||||
|
MAIN_PORT=10000
|
||||||
|
|
||||||
|
# This section contains all secrets pertaining to the system
|
||||||
|
# These should be updated
|
||||||
|
JWT_SECRET=testsecret
|
||||||
|
MINIO_ACCESS_KEY=budibase
|
||||||
|
MINIO_SECRET_KEY=budibase
|
||||||
|
COUCH_DB_PASSWORD=budibase
|
||||||
|
COUCH_DB_USER=budibase
|
||||||
|
REDIS_PASSWORD=budibase
|
||||||
|
INTERNAL_API_KEY=budibase
|
||||||
|
|
||||||
|
# This section contains variables that do not need to be altered under normal circumstances
|
||||||
|
APP_PORT=4002
|
||||||
|
WORKER_PORT=4003
|
||||||
|
MINIO_PORT=4004
|
||||||
|
COUCH_DB_PORT=4005
|
||||||
|
REDIS_PORT=6379
|
||||||
|
WATCHTOWER_PORT=6161
|
||||||
|
BUDIBASE_ENVIRONMENT=PRODUCTION
|
|
@ -1,2 +0,0 @@
|
||||||
FROM nginx:latest
|
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
|
|
@ -11,6 +11,7 @@ events {
|
||||||
http {
|
http {
|
||||||
include /etc/nginx/mime.types;
|
include /etc/nginx/mime.types;
|
||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
|
||||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||||
'$status $body_bytes_sent "$http_referer" '
|
'$status $body_bytes_sent "$http_referer" '
|
||||||
|
@ -43,6 +44,10 @@ http {
|
||||||
proxy_pass http://{{ address }}:4001;
|
proxy_pass http://{{ address }}:4001;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location = / {
|
||||||
|
proxy_pass http://{{ address }}:4001;
|
||||||
|
}
|
||||||
|
|
||||||
location /app_ {
|
location /app_ {
|
||||||
proxy_pass http://{{ address }}:4001;
|
proxy_pass http://{{ address }}:4001;
|
||||||
}
|
}
|
||||||
|
@ -63,7 +68,6 @@ http {
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Connection $connection_upgrade;
|
proxy_set_header Connection $connection_upgrade;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
}
|
}
|
||||||
|
@ -72,7 +76,6 @@ http {
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
proxy_set_header Host $http_host;
|
|
||||||
|
|
||||||
proxy_connect_timeout 300;
|
proxy_connect_timeout 300;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
|
|
|
@ -9,15 +9,23 @@ events {
|
||||||
}
|
}
|
||||||
|
|
||||||
http {
|
http {
|
||||||
limit_req_zone $binary_remote_addr zone=ratelimit:10m rate=10r/s;
|
limit_req_zone $binary_remote_addr zone=ratelimit:10m rate=20r/s;
|
||||||
include /etc/nginx/mime.types;
|
include /etc/nginx/mime.types;
|
||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
|
proxy_set_header Host $host;
|
||||||
charset utf-8;
|
charset utf-8;
|
||||||
sendfile on;
|
sendfile on;
|
||||||
tcp_nopush on;
|
tcp_nopush on;
|
||||||
tcp_nodelay on;
|
tcp_nodelay on;
|
||||||
server_tokens off;
|
server_tokens off;
|
||||||
types_hash_max_size 2048;
|
types_hash_max_size 2048;
|
||||||
|
{{#if compose}}
|
||||||
|
resolver 127.0.0.11 ipv6=off;
|
||||||
|
{{/if}}
|
||||||
|
{{#if k8s}}
|
||||||
|
resolver kube-dns.kube-system.svc.cluster.local valid=10s;
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
|
||||||
# buffering
|
# buffering
|
||||||
client_body_buffer_size 1K;
|
client_body_buffer_size 1K;
|
||||||
|
@ -34,83 +42,82 @@ http {
|
||||||
default "upgrade";
|
default "upgrade";
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 10000 default_server;
|
listen 10000 default_server;
|
||||||
listen [::]:10000 default_server;
|
listen [::]:10000 default_server;
|
||||||
server_name _;
|
server_name _;
|
||||||
port_in_redirect off;
|
client_max_body_size 1000m;
|
||||||
|
ignore_invalid_headers off;
|
||||||
|
proxy_buffering off;
|
||||||
|
# port_in_redirect off;
|
||||||
|
|
||||||
# Security Headers
|
# Security Headers
|
||||||
add_header X-Frame-Options SAMEORIGIN always;
|
add_header X-Frame-Options SAMEORIGIN always;
|
||||||
add_header X-Content-Type-Options nosniff always;
|
add_header X-Content-Type-Options nosniff always;
|
||||||
add_header X-XSS-Protection "1; mode=block" always;
|
add_header X-XSS-Protection "1; mode=block" always;
|
||||||
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdn.budi.live https://js.intercomcdn.com https://widget.intercom.io; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://fonts.googleapis.com https://rsms.me; object-src 'none'; base-uri 'self'; connect-src 'self' https://api-iam.intercom.io https://app.posthog.com wss://nexus-websocket-a.intercom.io; font-src 'self' data: https://cdn.jsdelivr.net https://fonts.gstatic.com https://rsms.me; frame-src 'self'; img-src http: https: data:; manifest-src 'self'; media-src 'self'; worker-src 'none';" always;
|
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdn.budi.live https://js.intercomcdn.com https://widget.intercom.io; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://fonts.googleapis.com https://rsms.me https://maxcdn.bootstrapcdn.com; object-src 'none'; base-uri 'self'; connect-src 'self' https://api-iam.intercom.io https://app.posthog.com wss://nexus-websocket-a.intercom.io; font-src 'self' data https://cdn.jsdelivr.net https://fonts.gstatic.com https://rsms.me https://maxcdn.bootstrapcdn.com; frame-src 'self'; img-src http: https: data; manifest-src 'self'; media-src 'self'; worker-src 'none';" always;
|
||||||
|
|
||||||
|
# upstreams
|
||||||
|
set $apps {{ apps }};
|
||||||
|
set $worker {{ worker }};
|
||||||
|
set $minio {{ minio }};
|
||||||
|
set $couchdb {{ couchdb }};
|
||||||
|
{{#if watchtower}}
|
||||||
|
set $watchtower {{ watchtower }};
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
location /app {
|
location /app {
|
||||||
proxy_pass http://app-service.budibase.svc.cluster.local:4002;
|
proxy_pass http://$apps:4002;
|
||||||
rewrite ^/app/(.*)$ /$1 break;
|
rewrite ^/app/(.*)$ /$1 break;
|
||||||
}
|
}
|
||||||
|
|
||||||
location = / {
|
location = / {
|
||||||
proxy_http_version 1.1;
|
proxy_pass http://$apps:4002;
|
||||||
proxy_set_header Connection $connection_upgrade;
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
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_pass http://app-service.budibase.svc.cluster.local:4002;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
location /builder/ {
|
{{#if watchtower}}
|
||||||
proxy_http_version 1.1;
|
location = /v1/update {
|
||||||
proxy_set_header Connection $connection_upgrade;
|
proxy_pass http://$watchtower:8080;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
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_pass http://app-service.budibase.svc.cluster.local:4002;
|
|
||||||
}
|
}
|
||||||
|
{{/if}}
|
||||||
location ~ ^/(builder|app_) {
|
location ~ ^/(builder|app_) {
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Connection $connection_upgrade;
|
proxy_set_header Connection $connection_upgrade;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_pass http://app-service.budibase.svc.cluster.local:4002;
|
proxy_pass http://$apps:4002;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ ^/api/(system|admin|global)/ {
|
location ~ ^/api/(system|admin|global)/ {
|
||||||
proxy_pass http://worker-service.budibase.svc.cluster.local:4001;
|
proxy_pass http://$worker:4003;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /worker/ {
|
location /worker/ {
|
||||||
proxy_pass http://worker-service.budibase.svc.cluster.local:4001;
|
proxy_pass http://$worker:4003;
|
||||||
rewrite ^/worker/(.*)$ /$1 break;
|
rewrite ^/worker/(.*)$ /$1 break;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /api/ {
|
location /api/ {
|
||||||
# calls to the API are rate limited with bursting
|
# calls to the API are rate limited with bursting
|
||||||
limit_req zone=ratelimit burst=10 nodelay;
|
limit_req zone=ratelimit burst=20 nodelay;
|
||||||
|
|
||||||
# 120s timeout on API requests
|
# 120s timeout on API requests
|
||||||
proxy_read_timeout 120s;
|
proxy_read_timeout 120s;
|
||||||
proxy_connect_timeout 120s;
|
proxy_connect_timeout 120s;
|
||||||
proxy_send_timeout 120s;
|
proxy_send_timeout 120s;
|
||||||
|
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Connection $connection_upgrade;
|
proxy_set_header Connection $connection_upgrade;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|
||||||
proxy_pass http://app-service.budibase.svc.cluster.local:4002;
|
proxy_pass http://$apps:4002;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /db/ {
|
location /db/ {
|
||||||
proxy_pass http://budibase-prod-svc-couchdb:5984;
|
proxy_pass http://$couchdb:5984;
|
||||||
rewrite ^/db/(.*)$ /$1 break;
|
rewrite ^/db/(.*)$ /$1 break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,13 +125,12 @@ http {
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
proxy_set_header Host $http_host;
|
|
||||||
proxy_set_header Connection "";
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
chunked_transfer_encoding off;
|
|
||||||
|
|
||||||
proxy_connect_timeout 300;
|
proxy_connect_timeout 300;
|
||||||
proxy_pass http://minio-service.budibase.svc.cluster.local:9000;
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Connection "";
|
||||||
|
chunked_transfer_encoding off;
|
||||||
|
proxy_pass http://$minio:9000;
|
||||||
}
|
}
|
||||||
|
|
||||||
client_header_timeout 60;
|
client_header_timeout 60;
|
||||||
|
@ -138,4 +144,4 @@ http {
|
||||||
gzip_comp_level 6;
|
gzip_comp_level 6;
|
||||||
gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml;
|
gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,2 +1,2 @@
|
||||||
FROM nginx:latest
|
FROM nginx:latest
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
COPY .generated-nginx.prod.conf /etc/nginx/nginx.conf
|
|
@ -9,7 +9,7 @@ events {
|
||||||
}
|
}
|
||||||
|
|
||||||
http {
|
http {
|
||||||
limit_req_zone $binary_remote_addr zone=ratelimit:10m rate=10r/s;
|
limit_req_zone $binary_remote_addr zone=ratelimit:10m rate=20r/s;
|
||||||
include /etc/nginx/mime.types;
|
include /etc/nginx/mime.types;
|
||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
charset utf-8;
|
charset utf-8;
|
||||||
|
@ -96,7 +96,7 @@ http {
|
||||||
|
|
||||||
location /api/ {
|
location /api/ {
|
||||||
# calls to the API are rate limited with bursting
|
# calls to the API are rate limited with bursting
|
||||||
limit_req zone=ratelimit burst=10 nodelay;
|
limit_req zone=ratelimit burst=20 nodelay;
|
||||||
|
|
||||||
# 120s timeout on API requests
|
# 120s timeout on API requests
|
||||||
proxy_read_timeout 120s;
|
proxy_read_timeout 120s;
|
||||||
|
|
|
@ -15,7 +15,7 @@ const IMAGES = {
|
||||||
|
|
||||||
const FILES = {
|
const FILES = {
|
||||||
COMPOSE: "docker-compose.yaml",
|
COMPOSE: "docker-compose.yaml",
|
||||||
NGINX: "nginx.conf"
|
ENV: ".env"
|
||||||
}
|
}
|
||||||
|
|
||||||
const OUTPUT_DIR = path.join(__dirname, "../", "bb-airgapped")
|
const OUTPUT_DIR = path.join(__dirname, "../", "bb-airgapped")
|
||||||
|
@ -40,8 +40,7 @@ for (let image in IMAGES) {
|
||||||
|
|
||||||
// copy config files
|
// copy config files
|
||||||
copyFile(FILES.COMPOSE)
|
copyFile(FILES.COMPOSE)
|
||||||
copyFile(FILES.ENVOY)
|
copyFile(FILES.ENV)
|
||||||
copyFile(FILES.PROPERTIES)
|
|
||||||
|
|
||||||
// compress
|
// compress
|
||||||
execSync(`tar -czf bb-airgapped.tar.gz hosting/scripts/bb-airgapped`)
|
execSync(`tar -czf bb-airgapped.tar.gz hosting/scripts/bb-airgapped`)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "1.0.66-alpha.0",
|
"version": "1.0.72-alpha.0",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
|
|
|
@ -44,8 +44,11 @@
|
||||||
"lint:fix": "yarn run lint:fix:ts && yarn run lint:fix:prettier && yarn run lint:fix:eslint",
|
"lint:fix": "yarn run lint:fix:ts && yarn run lint:fix:prettier && yarn run lint:fix:eslint",
|
||||||
"test:e2e": "lerna run cy:test",
|
"test:e2e": "lerna run cy:test",
|
||||||
"test:e2e:ci": "lerna run cy:ci",
|
"test:e2e:ci": "lerna run cy:ci",
|
||||||
"build:docker": "lerna run build:docker && npm run build:docker:proxy && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh $BUDIBASE_RELEASE_VERSION && cd -",
|
"build:docker": "lerna run build:docker && npm run build:docker:proxy:compose && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh $BUDIBASE_RELEASE_VERSION && cd -",
|
||||||
"build:docker:proxy": "docker build hosting/proxy -t proxy-service",
|
"build:docker:proxy": "docker build hosting/proxy -t proxy-service",
|
||||||
|
"build:docker:proxy:compose": "lerna run generate:proxy:compose && npm run build:docker:proxy",
|
||||||
|
"build:docker:proxy:preprod": "lerna run generate:proxy:preprod && npm run build:docker:proxy",
|
||||||
|
"build:docker:proxy:prod": "lerna run generate:proxy:prod && npm run build:docker:proxy",
|
||||||
"build:docker:selfhost": "lerna run build:docker && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh latest && cd -",
|
"build:docker:selfhost": "lerna run build:docker && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh latest && cd -",
|
||||||
"build:docker:develop": "node scripts/pinVersions && lerna run build:docker && npm run build:docker:proxy && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh develop && cd -",
|
"build:docker:develop": "node scripts/pinVersions && lerna run build:docker && npm run build:docker:proxy && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh develop && cd -",
|
||||||
"build:docker:airgap": "node hosting/scripts/airgapped/airgappedDockerBuild",
|
"build:docker:airgap": "node hosting/scripts/airgapped/airgappedDockerBuild",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/backend-core",
|
"name": "@budibase/backend-core",
|
||||||
"version": "1.0.66-alpha.0",
|
"version": "1.0.72-alpha.0",
|
||||||
"description": "Budibase backend core libraries used in server and worker",
|
"description": "Budibase backend core libraries used in server and worker",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
|
|
|
@ -17,7 +17,7 @@ exports.getAccount = async email => {
|
||||||
const json = await response.json()
|
const json = await response.json()
|
||||||
|
|
||||||
if (response.status !== 200) {
|
if (response.status !== 200) {
|
||||||
throw Error(`Error getting account by email ${email}`, json)
|
throw new Error(`Error getting account by email ${email}`, json)
|
||||||
}
|
}
|
||||||
|
|
||||||
return json[0]
|
return json[0]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const { getGlobalUserParams, getAllApps } = require("../db/utils")
|
const { getGlobalUserParams, getAllApps } = require("../db/utils")
|
||||||
const { getDB, getCouch } = require("../db")
|
const { getDB } = require("../db")
|
||||||
const { getGlobalDB } = require("../tenancy")
|
const { getGlobalDB } = require("../tenancy")
|
||||||
const { StaticDatabases } = require("../db/constants")
|
const { StaticDatabases } = require("../db/constants")
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ const removeGlobalDB = async tenantId => {
|
||||||
|
|
||||||
const removeTenantApps = async tenantId => {
|
const removeTenantApps = async tenantId => {
|
||||||
try {
|
try {
|
||||||
const apps = await getAllApps(getCouch(), { all: true })
|
const apps = await getAllApps({ all: true })
|
||||||
const destroyPromises = apps.map(app => getDB(app.appId).destroy())
|
const destroyPromises = apps.map(app => getDB(app.appId).destroy())
|
||||||
await Promise.allSettled(destroyPromises)
|
await Promise.allSettled(destroyPromises)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
|
@ -121,7 +121,7 @@ exports.getTenantId = () => {
|
||||||
}
|
}
|
||||||
const tenantId = cls.getFromContext(ContextKeys.TENANT_ID)
|
const tenantId = cls.getFromContext(ContextKeys.TENANT_ID)
|
||||||
if (!tenantId) {
|
if (!tenantId) {
|
||||||
throw Error("Tenant id not found")
|
throw new Error("Tenant id not found")
|
||||||
}
|
}
|
||||||
return tenantId
|
return tenantId
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,8 +179,11 @@ exports.getStartEndKeyURL = (base, baseKey, tenantId = null) => {
|
||||||
/**
|
/**
|
||||||
* if in production this will use the CouchDB _all_dbs call to retrieve a list of databases. If testing
|
* if in production this will use the CouchDB _all_dbs call to retrieve a list of databases. If testing
|
||||||
* when using Pouch it will use the pouchdb-all-dbs package.
|
* when using Pouch it will use the pouchdb-all-dbs package.
|
||||||
|
* opts.efficient can be provided to make sure this call is always quick in a multi-tenant environment,
|
||||||
|
* but it may not be 100% accurate in full efficiency mode (some tenantless apps may be missed).
|
||||||
*/
|
*/
|
||||||
exports.getAllDbs = async () => {
|
exports.getAllDbs = async (opts = { efficient: false }) => {
|
||||||
|
const efficient = opts && opts.efficient
|
||||||
// specifically for testing we use the pouch package for this
|
// specifically for testing we use the pouch package for this
|
||||||
if (env.isTest()) {
|
if (env.isTest()) {
|
||||||
return getCouch().allDbs()
|
return getCouch().allDbs()
|
||||||
|
@ -197,7 +200,7 @@ exports.getAllDbs = async () => {
|
||||||
}
|
}
|
||||||
let couchUrl = `${exports.getCouchUrl()}/_all_dbs`
|
let couchUrl = `${exports.getCouchUrl()}/_all_dbs`
|
||||||
let tenantId = getTenantId()
|
let tenantId = getTenantId()
|
||||||
if (!env.MULTI_TENANCY || tenantId === DEFAULT_TENANT_ID) {
|
if (!env.MULTI_TENANCY || (!efficient && tenantId === DEFAULT_TENANT_ID)) {
|
||||||
// just get all DBs when:
|
// just get all DBs when:
|
||||||
// - single tenancy
|
// - single tenancy
|
||||||
// - default tenant
|
// - default tenant
|
||||||
|
@ -225,13 +228,13 @@ exports.getAllDbs = async () => {
|
||||||
*
|
*
|
||||||
* @return {Promise<object[]>} returns the app information document stored in each app database.
|
* @return {Promise<object[]>} returns the app information document stored in each app database.
|
||||||
*/
|
*/
|
||||||
exports.getAllApps = async ({ dev, all, idsOnly } = {}) => {
|
exports.getAllApps = async ({ dev, all, idsOnly, efficient } = {}) => {
|
||||||
const CouchDB = getCouch()
|
const CouchDB = getCouch()
|
||||||
let tenantId = getTenantId()
|
let tenantId = getTenantId()
|
||||||
if (!env.MULTI_TENANCY && !tenantId) {
|
if (!env.MULTI_TENANCY && !tenantId) {
|
||||||
tenantId = DEFAULT_TENANT_ID
|
tenantId = DEFAULT_TENANT_ID
|
||||||
}
|
}
|
||||||
let dbs = await exports.getAllDbs()
|
let dbs = await exports.getAllDbs({ efficient })
|
||||||
const appDbNames = dbs.filter(dbName => {
|
const appDbNames = dbs.filter(dbName => {
|
||||||
const split = dbName.split(SEPARATOR)
|
const split = dbName.split(SEPARATOR)
|
||||||
// it is an app, check the tenantId
|
// it is an app, check the tenantId
|
||||||
|
|
|
@ -22,6 +22,7 @@ exports.getMigrationsDoc = async db => {
|
||||||
if (err.status && err.status === 404) {
|
if (err.status && err.status === 404) {
|
||||||
return { _id: DocumentTypes.MIGRATIONS }
|
return { _id: DocumentTypes.MIGRATIONS }
|
||||||
}
|
}
|
||||||
|
console.error(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/bbui",
|
"name": "@budibase/bbui",
|
||||||
"description": "A UI solution used in the different Budibase projects.",
|
"description": "A UI solution used in the different Budibase projects.",
|
||||||
"version": "1.0.66-alpha.0",
|
"version": "1.0.72-alpha.0",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"svelte": "src/index.js",
|
"svelte": "src/index.js",
|
||||||
"module": "dist/bbui.es.js",
|
"module": "dist/bbui.es.js",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/builder",
|
"name": "@budibase/builder",
|
||||||
"version": "1.0.66-alpha.0",
|
"version": "1.0.72-alpha.0",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -64,10 +64,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^1.0.66-alpha.0",
|
"@budibase/bbui": "^1.0.72-alpha.0",
|
||||||
"@budibase/client": "^1.0.66-alpha.0",
|
"@budibase/client": "^1.0.72-alpha.0",
|
||||||
"@budibase/frontend-core": "^1.0.66-alpha.0",
|
"@budibase/frontend-core": "^1.0.72-alpha.0",
|
||||||
"@budibase/string-templates": "^1.0.66-alpha.0",
|
"@budibase/string-templates": "^1.0.72-alpha.0",
|
||||||
"@sentry/browser": "5.19.1",
|
"@sentry/browser": "5.19.1",
|
||||||
"@spectrum-css/page": "^3.0.1",
|
"@spectrum-css/page": "^3.0.1",
|
||||||
"@spectrum-css/vars": "^3.0.1",
|
"@spectrum-css/vars": "^3.0.1",
|
||||||
|
|
|
@ -536,11 +536,13 @@ export const getSchemaForDatasource = (asset, datasource, options) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add schema properties if required
|
// Add schema properties if required
|
||||||
if (addId) {
|
if (schema) {
|
||||||
schema["_id"] = { type: "string" }
|
if (addId) {
|
||||||
}
|
schema["_id"] = { type: "string" }
|
||||||
if (addRev) {
|
}
|
||||||
schema["_rev"] = { type: "string" }
|
if (addRev) {
|
||||||
|
schema["_rev"] = { type: "string" }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure there are "name" properties for all fields and that field schema
|
// Ensure there are "name" properties for all fields and that field schema
|
||||||
|
|
|
@ -146,7 +146,7 @@
|
||||||
<div class="helper__description">
|
<div class="helper__description">
|
||||||
{@html helper.description}
|
{@html helper.description}
|
||||||
</div>
|
</div>
|
||||||
<pre class="helper__example">{helper.example || ''}</pre>
|
<pre class="helper__example">{helper.example || ""}</pre>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{/each}
|
{/each}
|
||||||
|
|
|
@ -74,6 +74,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
draftScreen.routing.route = route
|
draftScreen.routing.route = route
|
||||||
|
draftScreen.routing.roleId = roleId
|
||||||
|
|
||||||
await store.actions.screens.save(draftScreen)
|
await store.actions.screens.save(draftScreen)
|
||||||
if (draftScreen.props._instanceName.endsWith("List")) {
|
if (draftScreen.props._instanceName.endsWith("List")) {
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
let createUserModal
|
let createUserModal
|
||||||
let basicOnboardingModal
|
let basicOnboardingModal
|
||||||
|
|
||||||
function openBasicOnoboardingModal() {
|
function openBasicOnboardingModal() {
|
||||||
createUserModal.hide()
|
createUserModal.hide()
|
||||||
basicOnboardingModal.show()
|
basicOnboardingModal.show()
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|
||||||
<Modal bind:this={createUserModal}>
|
<Modal bind:this={createUserModal}>
|
||||||
<AddUserModal on:change={openBasicOnoboardingModal} />
|
<AddUserModal on:change={openBasicOnboardingModal} />
|
||||||
</Modal>
|
</Modal>
|
||||||
<Modal bind:this={basicOnboardingModal}><BasicOnboardingModal {email} /></Modal>
|
<Modal bind:this={basicOnboardingModal}><BasicOnboardingModal {email} /></Modal>
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ export function createUsersStore() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function invite({ email, builder, admin }) {
|
async function invite({ email, builder, admin }) {
|
||||||
await API.inviteUser({
|
return API.inviteUser({
|
||||||
email,
|
email,
|
||||||
builder,
|
builder,
|
||||||
admin,
|
admin,
|
||||||
|
@ -19,7 +19,7 @@ export function createUsersStore() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function acceptInvite(inviteCode, password) {
|
async function acceptInvite(inviteCode, password) {
|
||||||
await API.acceptInvite({
|
return API.acceptInvite({
|
||||||
inviteCode,
|
inviteCode,
|
||||||
password,
|
password,
|
||||||
})
|
})
|
||||||
|
|
|
@ -920,116 +920,6 @@
|
||||||
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
||||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||||
|
|
||||||
"@budibase/bbui@^1.0.58-alpha.1", "@budibase/bbui@^1.0.62":
|
|
||||||
version "1.0.62"
|
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-1.0.62.tgz#985e64f428ff4fa66e936f803abb2368bc2813e0"
|
|
||||||
integrity sha512-nvzo5li6/UQaIl5MMkinu4gUAZkv7HqWHXrFKWbzTt4xBRO0D8C+QgH62X5ZRBTFd34jIEsNJP1isJl38LvESQ==
|
|
||||||
dependencies:
|
|
||||||
"@adobe/spectrum-css-workflow-icons" "^1.2.1"
|
|
||||||
"@spectrum-css/actionbutton" "^1.0.1"
|
|
||||||
"@spectrum-css/actiongroup" "^1.0.1"
|
|
||||||
"@spectrum-css/avatar" "^3.0.2"
|
|
||||||
"@spectrum-css/button" "^3.0.1"
|
|
||||||
"@spectrum-css/buttongroup" "^3.0.2"
|
|
||||||
"@spectrum-css/checkbox" "^3.0.2"
|
|
||||||
"@spectrum-css/dialog" "^3.0.1"
|
|
||||||
"@spectrum-css/divider" "^1.0.3"
|
|
||||||
"@spectrum-css/dropzone" "^3.0.2"
|
|
||||||
"@spectrum-css/fieldgroup" "^3.0.2"
|
|
||||||
"@spectrum-css/fieldlabel" "^3.0.1"
|
|
||||||
"@spectrum-css/icon" "^3.0.1"
|
|
||||||
"@spectrum-css/illustratedmessage" "^3.0.2"
|
|
||||||
"@spectrum-css/inlinealert" "^2.0.1"
|
|
||||||
"@spectrum-css/inputgroup" "^3.0.2"
|
|
||||||
"@spectrum-css/label" "^2.0.10"
|
|
||||||
"@spectrum-css/link" "^3.1.1"
|
|
||||||
"@spectrum-css/menu" "^3.0.1"
|
|
||||||
"@spectrum-css/modal" "^3.0.1"
|
|
||||||
"@spectrum-css/pagination" "^3.0.3"
|
|
||||||
"@spectrum-css/picker" "^1.0.1"
|
|
||||||
"@spectrum-css/popover" "^3.0.1"
|
|
||||||
"@spectrum-css/progressbar" "^1.0.2"
|
|
||||||
"@spectrum-css/progresscircle" "^1.0.2"
|
|
||||||
"@spectrum-css/radio" "^3.0.2"
|
|
||||||
"@spectrum-css/search" "^3.0.2"
|
|
||||||
"@spectrum-css/sidenav" "^3.0.2"
|
|
||||||
"@spectrum-css/statuslight" "^3.0.2"
|
|
||||||
"@spectrum-css/stepper" "^3.0.3"
|
|
||||||
"@spectrum-css/switch" "^1.0.2"
|
|
||||||
"@spectrum-css/table" "^3.0.1"
|
|
||||||
"@spectrum-css/tabs" "^3.0.1"
|
|
||||||
"@spectrum-css/tags" "^3.0.2"
|
|
||||||
"@spectrum-css/textfield" "^3.0.1"
|
|
||||||
"@spectrum-css/toast" "^3.0.1"
|
|
||||||
"@spectrum-css/tooltip" "^3.0.3"
|
|
||||||
"@spectrum-css/treeview" "^3.0.2"
|
|
||||||
"@spectrum-css/typography" "^3.0.1"
|
|
||||||
"@spectrum-css/underlay" "^2.0.9"
|
|
||||||
"@spectrum-css/vars" "^3.0.1"
|
|
||||||
dayjs "^1.10.4"
|
|
||||||
easymde "^2.16.1"
|
|
||||||
svelte-flatpickr "^3.2.3"
|
|
||||||
svelte-portal "^1.0.0"
|
|
||||||
|
|
||||||
"@budibase/client@^1.0.58-alpha.1":
|
|
||||||
version "1.0.62"
|
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/client/-/client-1.0.62.tgz#a737a94390149da57bb27b2b49bff94053e7660c"
|
|
||||||
integrity sha512-sX3VmOf9bpGmfkxqKfEvVrpD5X9BEsqoJ9jyjvy3IMHfIQ0Y+Yr0ZAJL25nrh33JL16Ir4CtDSCihdE7qtbA7Q==
|
|
||||||
dependencies:
|
|
||||||
"@budibase/bbui" "^1.0.62"
|
|
||||||
"@budibase/frontend-core" "^1.0.62"
|
|
||||||
"@budibase/string-templates" "^1.0.62"
|
|
||||||
regexparam "^1.3.0"
|
|
||||||
rollup-plugin-polyfill-node "^0.8.0"
|
|
||||||
shortid "^2.2.15"
|
|
||||||
svelte-spa-router "^3.0.5"
|
|
||||||
|
|
||||||
"@budibase/frontend-core@^1.0.58-alpha.1", "@budibase/frontend-core@^1.0.62":
|
|
||||||
version "1.0.62"
|
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/frontend-core/-/frontend-core-1.0.62.tgz#8d7436bb22a327ba0f1343805323c33c87d44d84"
|
|
||||||
integrity sha512-LF028SoFAXaHajNr3UYiKuBl+h3h4kDNdu2NfGQjkU96kZq4Aqq2Ey174jj2wT6k97kEV7ht2pBTR4jU7s4aWQ==
|
|
||||||
dependencies:
|
|
||||||
"@budibase/bbui" "^1.0.62"
|
|
||||||
lodash "^4.17.21"
|
|
||||||
svelte "^3.46.2"
|
|
||||||
|
|
||||||
"@budibase/handlebars-helpers@^0.11.7":
|
|
||||||
version "0.11.8"
|
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/handlebars-helpers/-/handlebars-helpers-0.11.8.tgz#6953d29673a8c5c407e096c0a84890465c7ce841"
|
|
||||||
integrity sha512-ggWJUt0GqsHFAEup5tlWlcrmYML57nKhpNGGLzVsqXVYN8eVmf3xluYmmMe7fDYhQH0leSprrdEXmsdFQF3HAQ==
|
|
||||||
dependencies:
|
|
||||||
array-sort "^1.0.0"
|
|
||||||
define-property "^2.0.2"
|
|
||||||
extend-shallow "^3.0.2"
|
|
||||||
for-in "^1.0.2"
|
|
||||||
get-object "^0.2.0"
|
|
||||||
get-value "^3.0.1"
|
|
||||||
handlebars "^4.7.7"
|
|
||||||
handlebars-utils "^1.0.6"
|
|
||||||
has-value "^2.0.2"
|
|
||||||
helper-md "^0.2.2"
|
|
||||||
html-tag "^2.0.0"
|
|
||||||
is-even "^1.0.0"
|
|
||||||
is-glob "^4.0.1"
|
|
||||||
kind-of "^6.0.3"
|
|
||||||
micromatch "^3.1.5"
|
|
||||||
relative "^3.0.2"
|
|
||||||
striptags "^3.1.1"
|
|
||||||
to-gfm-code-block "^0.1.1"
|
|
||||||
year "^0.2.1"
|
|
||||||
|
|
||||||
"@budibase/string-templates@^1.0.58-alpha.1", "@budibase/string-templates@^1.0.62":
|
|
||||||
version "1.0.62"
|
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/string-templates/-/string-templates-1.0.62.tgz#f78ddde139a3f67e538c58b7e866244d1dbedfe8"
|
|
||||||
integrity sha512-0ujwPgJ6y54Wxyx6PH6qvg7ufioo+YtWtncrSDZ1bXdFX2uFHxrrHDYIQEG8c4e61ub/tvNESNAB/4Gb3IN4uA==
|
|
||||||
dependencies:
|
|
||||||
"@budibase/handlebars-helpers" "^0.11.7"
|
|
||||||
dayjs "^1.10.4"
|
|
||||||
handlebars "^4.7.6"
|
|
||||||
handlebars-utils "^1.0.6"
|
|
||||||
lodash "^4.17.20"
|
|
||||||
vm2 "^3.9.4"
|
|
||||||
|
|
||||||
"@cnakazawa/watch@^1.0.3":
|
"@cnakazawa/watch@^1.0.3":
|
||||||
version "1.0.4"
|
version "1.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.4.tgz#f864ae85004d0fcab6f50be9141c4da368d1656a"
|
resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.4.tgz#f864ae85004d0fcab6f50be9141c4da368d1656a"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/cli",
|
"name": "@budibase/cli",
|
||||||
"version": "1.0.66-alpha.0",
|
"version": "1.0.72-alpha.0",
|
||||||
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/client",
|
"name": "@budibase/client",
|
||||||
"version": "1.0.66-alpha.0",
|
"version": "1.0.72-alpha.0",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"module": "dist/budibase-client.js",
|
"module": "dist/budibase-client.js",
|
||||||
"main": "dist/budibase-client.js",
|
"main": "dist/budibase-client.js",
|
||||||
|
@ -19,25 +19,12 @@
|
||||||
"dev:builder": "rollup -cw"
|
"dev:builder": "rollup -cw"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^1.0.66-alpha.0",
|
"@budibase/bbui": "^1.0.72-alpha.0",
|
||||||
"@budibase/frontend-core": "^1.0.66-alpha.0",
|
"@budibase/frontend-core": "^1.0.72-alpha.0",
|
||||||
"@budibase/string-templates": "^1.0.66-alpha.0",
|
"@budibase/string-templates": "^1.0.72-alpha.0",
|
||||||
"@spectrum-css/button": "^3.0.3",
|
|
||||||
"@spectrum-css/card": "^3.0.3",
|
|
||||||
"@spectrum-css/divider": "^1.0.3",
|
|
||||||
"@spectrum-css/link": "^3.1.3",
|
|
||||||
"@spectrum-css/page": "^3.0.1",
|
|
||||||
"@spectrum-css/tag": "^3.1.4",
|
|
||||||
"@spectrum-css/typography": "^3.0.2",
|
|
||||||
"@spectrum-css/vars": "^3.0.1",
|
|
||||||
"apexcharts": "^3.22.1",
|
|
||||||
"dayjs": "^1.10.5",
|
|
||||||
"regexparam": "^1.3.0",
|
"regexparam": "^1.3.0",
|
||||||
"rollup-plugin-polyfill-node": "^0.8.0",
|
"rollup-plugin-polyfill-node": "^0.8.0",
|
||||||
"shortid": "^2.2.15",
|
"shortid": "^2.2.15",
|
||||||
"svelte": "^3.38.2",
|
|
||||||
"svelte-apexcharts": "^1.0.2",
|
|
||||||
"svelte-flatpickr": "^3.1.0",
|
|
||||||
"svelte-spa-router": "^3.0.5"
|
"svelte-spa-router": "^3.0.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/frontend-core",
|
"name": "@budibase/frontend-core",
|
||||||
"version": "1.0.66-alpha.0",
|
"version": "1.0.72-alpha.0",
|
||||||
"description": "Budibase frontend core libraries used in builder and client",
|
"description": "Budibase frontend core libraries used in builder and client",
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"svelte": "src/index.js",
|
"svelte": "src/index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^1.0.66-alpha.0",
|
"@budibase/bbui": "^1.0.72-alpha.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"svelte": "^3.46.2"
|
"svelte": "^3.46.2"
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ export const buildOtherEndpoints = API => ({
|
||||||
getBudibaseVersion: async () => {
|
getBudibaseVersion: async () => {
|
||||||
return await API.get({
|
return await API.get({
|
||||||
url: "/api/dev/version",
|
url: "/api/dev/version",
|
||||||
})
|
}).version
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -113,11 +113,11 @@ export const buildUserEndpoints = API => ({
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Accepts an invitation to join the platform and creates a user.
|
* Accepts an invite to join the platform and creates a user.
|
||||||
* @param inviteCode the invite code sent in the email
|
* @param inviteCode the invite code sent in the email
|
||||||
* @param password the password for the newly created user
|
* @param password the password for the newly created user
|
||||||
*/
|
*/
|
||||||
acceptInvitation: async ({ inviteCode, password }) => {
|
acceptInvite: async ({ inviteCode, password }) => {
|
||||||
return await API.post({
|
return await API.post({
|
||||||
url: "/api/global/users/invite/accept",
|
url: "/api/global/users/invite/accept",
|
||||||
body: {
|
body: {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/server",
|
"name": "@budibase/server",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "1.0.66-alpha.0",
|
"version": "1.0.72-alpha.0",
|
||||||
"description": "Budibase Web Server",
|
"description": "Budibase Web Server",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -21,6 +21,9 @@
|
||||||
"dev:stack:down": "node scripts/dev/manage.js down",
|
"dev:stack:down": "node scripts/dev/manage.js down",
|
||||||
"dev:stack:nuke": "node scripts/dev/manage.js nuke",
|
"dev:stack:nuke": "node scripts/dev/manage.js nuke",
|
||||||
"dev:builder": "yarn run dev:stack:up && nodemon",
|
"dev:builder": "yarn run dev:stack:up && nodemon",
|
||||||
|
"generate:proxy:compose": "node scripts/proxy/generateProxyConfig compose",
|
||||||
|
"generate:proxy:preprod": "node scripts/proxy/generateProxyConfig preprod",
|
||||||
|
"generate:proxy:prod": "node scripts/proxy/generateProxyConfig prod",
|
||||||
"format": "prettier --config ../../.prettierrc.json 'src/**/*.ts' --write",
|
"format": "prettier --config ../../.prettierrc.json 'src/**/*.ts' --write",
|
||||||
"lint": "eslint --fix src/",
|
"lint": "eslint --fix src/",
|
||||||
"lint:fix": "yarn run format && yarn run lint",
|
"lint:fix": "yarn run format && yarn run lint",
|
||||||
|
@ -70,9 +73,9 @@
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apidevtools/swagger-parser": "^10.0.3",
|
"@apidevtools/swagger-parser": "^10.0.3",
|
||||||
"@budibase/backend-core": "^1.0.66-alpha.0",
|
"@budibase/backend-core": "^1.0.72-alpha.0",
|
||||||
"@budibase/client": "^1.0.66-alpha.0",
|
"@budibase/client": "^1.0.72-alpha.0",
|
||||||
"@budibase/string-templates": "^1.0.66-alpha.0",
|
"@budibase/string-templates": "^1.0.72-alpha.0",
|
||||||
"@bull-board/api": "^3.7.0",
|
"@bull-board/api": "^3.7.0",
|
||||||
"@bull-board/koa": "^3.7.0",
|
"@bull-board/koa": "^3.7.0",
|
||||||
"@elastic/elasticsearch": "7.10.0",
|
"@elastic/elasticsearch": "7.10.0",
|
||||||
|
|
|
@ -37,7 +37,7 @@ async function init() {
|
||||||
const envFileJson = {
|
const envFileJson = {
|
||||||
PORT: 4001,
|
PORT: 4001,
|
||||||
MINIO_URL: "http://localhost:4004",
|
MINIO_URL: "http://localhost:4004",
|
||||||
COUCH_DB_URL: "http://budibase:budibase@localhost:10000/db/",
|
COUCH_DB_URL: "http://budibase:budibase@localhost:4005",
|
||||||
REDIS_URL: "localhost:6379",
|
REDIS_URL: "localhost:6379",
|
||||||
WORKER_URL: "http://localhost:4002",
|
WORKER_URL: "http://localhost:4002",
|
||||||
INTERNAL_API_KEY: "budibase",
|
INTERNAL_API_KEY: "budibase",
|
||||||
|
|
70
packages/server/scripts/proxy/generateProxyConfig.js
Normal file
70
packages/server/scripts/proxy/generateProxyConfig.js
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
#!/usr/bin/env node
|
||||||
|
const path = require("path")
|
||||||
|
const fs = require("fs")
|
||||||
|
const { processStringSync } = require("@budibase/string-templates")
|
||||||
|
|
||||||
|
const Configs = {
|
||||||
|
prod: {
|
||||||
|
k8s: true,
|
||||||
|
apps: "app-service.budibase.svc.cluster.local",
|
||||||
|
worker: "worker-service.budibase.svc.cluster.local",
|
||||||
|
minio: "minio-service.budibase.svc.cluster.local",
|
||||||
|
couchdb: "budibase-prod-svc-couchdb",
|
||||||
|
},
|
||||||
|
preprod: {
|
||||||
|
k8s: true,
|
||||||
|
apps: "app-service.budibase.svc.cluster.local",
|
||||||
|
worker: "worker-service.budibase.svc.cluster.local",
|
||||||
|
minio: "minio-service.budibase.svc.cluster.local",
|
||||||
|
couchdb: "budibase-preprod-svc-couchdb",
|
||||||
|
},
|
||||||
|
compose: {
|
||||||
|
compose: true,
|
||||||
|
apps: "app-service",
|
||||||
|
worker: "worker-service",
|
||||||
|
minio: "minio-service",
|
||||||
|
couchdb: "couchdb-service",
|
||||||
|
watchtower: "watchtower-service",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
const Commands = {
|
||||||
|
Prod: "prod",
|
||||||
|
Preprod: "preprod",
|
||||||
|
Compose: "compose",
|
||||||
|
}
|
||||||
|
|
||||||
|
async function init(managementCommand) {
|
||||||
|
const config = Configs[managementCommand]
|
||||||
|
const hostingPath = path.join(process.cwd(), "..", "..", "hosting")
|
||||||
|
const nginxHbsPath = path.join(hostingPath, "nginx.prod.conf.hbs")
|
||||||
|
const nginxOutputPath = path.join(
|
||||||
|
hostingPath,
|
||||||
|
"proxy",
|
||||||
|
".generated-nginx.prod.conf"
|
||||||
|
)
|
||||||
|
const contents = fs.readFileSync(nginxHbsPath, "utf8")
|
||||||
|
fs.writeFileSync(nginxOutputPath, processStringSync(contents, config))
|
||||||
|
}
|
||||||
|
|
||||||
|
const managementCommand = process.argv.slice(2)[0]
|
||||||
|
|
||||||
|
if (
|
||||||
|
!managementCommand ||
|
||||||
|
!Object.values(Commands).some(command => managementCommand === command)
|
||||||
|
) {
|
||||||
|
throw new Error(
|
||||||
|
"You must supply either a 'compose', 'preprod' or 'prod' commmand to generate an NGINX config."
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
init(managementCommand)
|
||||||
|
.then(() => {
|
||||||
|
console.log("Done! 🎉")
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.error(
|
||||||
|
"Something went wrong while creating the nginx configuration",
|
||||||
|
err.message
|
||||||
|
)
|
||||||
|
})
|
|
@ -118,5 +118,7 @@ exports.revert = async ctx => {
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.getBudibaseVersion = async ctx => {
|
exports.getBudibaseVersion = async ctx => {
|
||||||
ctx.body = require("../../../package.json").version
|
ctx.body = {
|
||||||
|
version: require("../../../package.json").version,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ const allDbs = require("pouchdb-all-dbs")
|
||||||
const find = require("pouchdb-find")
|
const find = require("pouchdb-find")
|
||||||
const env = require("../environment")
|
const env = require("../environment")
|
||||||
|
|
||||||
const COUCH_DB_URL = getCouchUrl() || "http://localhost:10000/db/"
|
const COUCH_DB_URL = getCouchUrl() || "http://localhost:4005"
|
||||||
|
|
||||||
PouchDB.plugin(replicationStream.plugin)
|
PouchDB.plugin(replicationStream.plugin)
|
||||||
PouchDB.plugin(find)
|
PouchDB.plugin(find)
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/string-templates",
|
"name": "@budibase/string-templates",
|
||||||
"version": "1.0.66-alpha.0",
|
"version": "1.0.72-alpha.0",
|
||||||
"description": "Handlebars wrapper for Budibase templating.",
|
"description": "Handlebars wrapper for Budibase templating.",
|
||||||
"main": "src/index.cjs",
|
"main": "src/index.cjs",
|
||||||
"module": "dist/bundle.mjs",
|
"module": "dist/bundle.mjs",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/worker",
|
"name": "@budibase/worker",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "1.0.66-alpha.0",
|
"version": "1.0.72-alpha.0",
|
||||||
"description": "Budibase background service",
|
"description": "Budibase background service",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -34,8 +34,8 @@
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/backend-core": "^1.0.66-alpha.0",
|
"@budibase/backend-core": "^1.0.72-alpha.0",
|
||||||
"@budibase/string-templates": "^1.0.66-alpha.0",
|
"@budibase/string-templates": "^1.0.72-alpha.0",
|
||||||
"@koa/router": "^8.0.0",
|
"@koa/router": "^8.0.0",
|
||||||
"@sentry/node": "^6.0.0",
|
"@sentry/node": "^6.0.0",
|
||||||
"@techpass/passport-openidconnect": "^0.3.0",
|
"@techpass/passport-openidconnect": "^0.3.0",
|
||||||
|
|
|
@ -16,7 +16,7 @@ async function init() {
|
||||||
REDIS_URL: "localhost:6379",
|
REDIS_URL: "localhost:6379",
|
||||||
REDIS_PASSWORD: "budibase",
|
REDIS_PASSWORD: "budibase",
|
||||||
MINIO_URL: "http://localhost:4004",
|
MINIO_URL: "http://localhost:4004",
|
||||||
COUCH_DB_URL: "http://budibase:budibase@localhost:10000/db/",
|
COUCH_DB_URL: "http://budibase:budibase@localhost:4005",
|
||||||
COUCH_DB_USERNAME: "budibase",
|
COUCH_DB_USERNAME: "budibase",
|
||||||
COUCH_DB_PASSWORD: "budibase",
|
COUCH_DB_PASSWORD: "budibase",
|
||||||
// empty string is false
|
// empty string is false
|
||||||
|
|
|
@ -246,12 +246,16 @@ exports.destroy = async function (ctx) {
|
||||||
|
|
||||||
exports.configChecklist = async function (ctx) {
|
exports.configChecklist = async function (ctx) {
|
||||||
const db = getGlobalDB()
|
const db = getGlobalDB()
|
||||||
|
const tenantId = getTenantId()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// TODO: Watch get started video
|
// TODO: Watch get started video
|
||||||
|
|
||||||
// Apps exist
|
let apps = []
|
||||||
const apps = await getAllApps({ idsOnly: true })
|
if (!env.MULTI_TENANCY || tenantId) {
|
||||||
|
// Apps exist
|
||||||
|
apps = await getAllApps({ idsOnly: true, efficient: true })
|
||||||
|
}
|
||||||
|
|
||||||
// They have set up SMTP
|
// They have set up SMTP
|
||||||
const smtpConfig = await getScopedFullConfig(db, {
|
const smtpConfig = await getScopedFullConfig(db, {
|
||||||
|
|
|
@ -4,7 +4,7 @@ const env = require("../environment")
|
||||||
const { getCouchUrl } = require("@budibase/backend-core/db")
|
const { getCouchUrl } = require("@budibase/backend-core/db")
|
||||||
|
|
||||||
// level option is purely for testing (development)
|
// level option is purely for testing (development)
|
||||||
const COUCH_DB_URL = getCouchUrl() || "http://localhost:10000/db/"
|
const COUCH_DB_URL = getCouchUrl() || "http://localhost:4005"
|
||||||
|
|
||||||
let POUCH_DB_DEFAULTS = {
|
let POUCH_DB_DEFAULTS = {
|
||||||
prefix: COUCH_DB_URL,
|
prefix: COUCH_DB_URL,
|
||||||
|
|
Loading…
Reference in a new issue