Merge branch 'develop' of github.com:Budibase/budibase into cheeks-lab-day-portal-redesign
This commit is contained in:
commit
a4aea23bf9
|
@ -38,17 +38,6 @@ jobs:
|
||||||
fi
|
fi
|
||||||
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Tag and release Proxy service docker image
|
|
||||||
run: |
|
|
||||||
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
|
|
||||||
yarn build:docker:proxy:prod
|
|
||||||
docker tag proxy-service budibase/proxy:$PROD_TAG
|
|
||||||
docker push budibase/proxy:$PROD_TAG
|
|
||||||
env:
|
|
||||||
DOCKER_USER: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }}
|
|
||||||
PROD_TAG: k8s
|
|
||||||
|
|
||||||
- name: Configure AWS Credentials
|
- name: Configure AWS Credentials
|
||||||
uses: aws-actions/configure-aws-credentials@v1
|
uses: aws-actions/configure-aws-credentials@v1
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -28,17 +28,6 @@ jobs:
|
||||||
release_version=$(cat lerna.json | jq -r '.version')
|
release_version=$(cat lerna.json | jq -r '.version')
|
||||||
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Tag and release Proxy service docker image
|
|
||||||
run: |
|
|
||||||
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
|
|
||||||
yarn build:docker:proxy:preprod
|
|
||||||
docker tag proxy-service budibase/proxy:$PREPROD_TAG
|
|
||||||
docker push budibase/proxy:$PREPROD_TAG
|
|
||||||
env:
|
|
||||||
DOCKER_USER: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }}
|
|
||||||
PREPROD_TAG: k8s-preprod
|
|
||||||
|
|
||||||
- name: Pull values.yaml from budibase-infra
|
- name: Pull values.yaml from budibase-infra
|
||||||
run: |
|
run: |
|
||||||
curl -H "Authorization: token ${{ secrets.GH_PERSONAL_TOKEN }}" \
|
curl -H "Authorization: token ${{ secrets.GH_PERSONAL_TOKEN }}" \
|
||||||
|
|
|
@ -29,17 +29,6 @@ jobs:
|
||||||
release_version=$(cat lerna.json | jq -r '.version')
|
release_version=$(cat lerna.json | jq -r '.version')
|
||||||
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Tag and release Proxy service docker image
|
|
||||||
run: |
|
|
||||||
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
|
|
||||||
yarn build:docker:proxy:release
|
|
||||||
docker tag proxy-service budibase/proxy:$RELEASE_TAG
|
|
||||||
docker push budibase/proxy:$RELEASE_TAG
|
|
||||||
env:
|
|
||||||
DOCKER_USER: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }}
|
|
||||||
RELEASE_TAG: k8s-release
|
|
||||||
|
|
||||||
- name: Pull values.yaml from budibase-infra
|
- name: Pull values.yaml from budibase-infra
|
||||||
run: |
|
run: |
|
||||||
curl -H "Authorization: token ${{ secrets.GH_PERSONAL_TOKEN }}" \
|
curl -H "Authorization: token ${{ secrets.GH_PERSONAL_TOKEN }}" \
|
||||||
|
|
|
@ -69,17 +69,6 @@ jobs:
|
||||||
DOCKER_USER: ${{ secrets.DOCKER_USERNAME }}
|
DOCKER_USER: ${{ secrets.DOCKER_USERNAME }}
|
||||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }}
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }}
|
||||||
|
|
||||||
- name: Tag and release Proxy service docker image
|
|
||||||
run: |
|
|
||||||
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
|
|
||||||
yarn build:docker:proxy:release
|
|
||||||
docker tag proxy-service budibase/proxy:$RELEASE_TAG
|
|
||||||
docker push budibase/proxy:$RELEASE_TAG
|
|
||||||
env:
|
|
||||||
DOCKER_USER: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }}
|
|
||||||
RELEASE_TAG: k8s-release
|
|
||||||
|
|
||||||
deploy-to-release-env:
|
deploy-to-release-env:
|
||||||
needs: [release-images]
|
needs: [release-images]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -193,6 +182,7 @@ jobs:
|
||||||
needs: [release-helm-chart]
|
needs: [release-helm-chart]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
- name: Get the current budibase release version
|
- name: Get the current budibase release version
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -98,17 +98,6 @@ jobs:
|
||||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
aws-region: eu-west-1
|
aws-region: eu-west-1
|
||||||
|
|
||||||
- name: Tag and release Proxy service docker image
|
|
||||||
run: |
|
|
||||||
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
|
|
||||||
yarn build:docker:proxy:preprod
|
|
||||||
docker tag proxy-service budibase/proxy:$PREPROD_TAG
|
|
||||||
docker push budibase/proxy:$PREPROD_TAG
|
|
||||||
env:
|
|
||||||
DOCKER_USER: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }}
|
|
||||||
PREPROD_TAG: k8s-preprod
|
|
||||||
|
|
||||||
- name: Pull values.yaml from budibase-infra
|
- name: Pull values.yaml from budibase-infra
|
||||||
run: |
|
run: |
|
||||||
curl -H "Authorization: token ${{ secrets.GH_PERSONAL_TOKEN }}" \
|
curl -H "Authorization: token ${{ secrets.GH_PERSONAL_TOKEN }}" \
|
||||||
|
|
|
@ -66,8 +66,6 @@ typings/
|
||||||
.env
|
.env
|
||||||
!qa-core/.env
|
!qa-core/.env
|
||||||
!hosting/.env
|
!hosting/.env
|
||||||
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
|
||||||
|
@ -105,7 +103,9 @@ stats.html
|
||||||
|
|
||||||
# TypeScript cache
|
# TypeScript cache
|
||||||
*.tsbuildinfo
|
*.tsbuildinfo
|
||||||
|
|
||||||
|
# plugins
|
||||||
budibase-component
|
budibase-component
|
||||||
budibase-datasource
|
budibase-datasource
|
||||||
|
|
||||||
*.iml
|
*.iml
|
||||||
|
|
|
@ -28,11 +28,26 @@ spec:
|
||||||
app.kubernetes.io/name: budibase-proxy
|
app.kubernetes.io/name: budibase-proxy
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- image: budibase/proxy:{{ .Values.services.proxy.tag | default "k8s" }}
|
- image: budibase/proxy:{{ .Values.globals.appVersion }}
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
name: proxy-service
|
name: proxy-service
|
||||||
ports:
|
ports:
|
||||||
- containerPort: {{ .Values.services.proxy.port }}
|
- containerPort: {{ .Values.services.proxy.port }}
|
||||||
|
env:
|
||||||
|
- name: APPS_UPSTREAM_URL
|
||||||
|
value: {{ tpl .Values.services.proxy.upstreams.apps . | quote }}
|
||||||
|
- name: WORKER_UPSTREAM_URL
|
||||||
|
value: {{ tpl .Values.services.proxy.upstreams.worker . | quote }}
|
||||||
|
- name: MINIO_UPSTREAM_URL
|
||||||
|
value: {{ tpl .Values.services.proxy.upstreams.minio . | quote }}
|
||||||
|
- name: COUCHDB_UPSTREAM_URL
|
||||||
|
value: {{ .Values.services.couchdb.url | default (tpl .Values.services.proxy.upstreams.couchdb .) | quote }}
|
||||||
|
- name: RESOLVER
|
||||||
|
{{ if .Values.services.proxy.resolver }}
|
||||||
|
value: {{ .Values.services.proxy.resolver }}
|
||||||
|
{{ else }}
|
||||||
|
value: kube-dns.kube-system.svc.{{ .Values.services.dns }}
|
||||||
|
{{ end }}
|
||||||
{{ with .Values.services.proxy.resources }}
|
{{ with .Values.services.proxy.resources }}
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml . | nindent 10 }}
|
{{- toYaml . | nindent 10 }}
|
||||||
|
|
|
@ -124,6 +124,11 @@ services:
|
||||||
proxy:
|
proxy:
|
||||||
port: 10000
|
port: 10000
|
||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
|
upstreams:
|
||||||
|
apps: 'http://app-service.{{ .Release.Namespace }}.svc.{{ .Values.services.dns }}:{{ .Values.services.apps.port }}'
|
||||||
|
worker: 'http://worker-service.{{ .Release.Namespace }}.svc.{{ .Values.services.dns }}:{{ .Values.services.worker.port }}'
|
||||||
|
minio: 'http://minio-service.{{ .Release.Namespace }}.svc.{{ .Values.services.dns }}:{{ .Values.services.objectStore.port }}'
|
||||||
|
couchdb: 'http://{{ .Release.Name }}-svc-couchdb:{{ .Values.services.couchdb.port }}'
|
||||||
resources: {}
|
resources: {}
|
||||||
|
|
||||||
apps:
|
apps:
|
||||||
|
|
|
@ -27,7 +27,7 @@ services:
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
image: nginx:latest
|
image: nginx:latest
|
||||||
volumes:
|
volumes:
|
||||||
- ./.generated-nginx.dev.conf:/etc/nginx/nginx.conf
|
- ./nginx.dev.conf:/etc/nginx/nginx.conf
|
||||||
- ./proxy/error.html:/usr/share/nginx/html/error.html
|
- ./proxy/error.html:/usr/share/nginx/html/error.html
|
||||||
ports:
|
ports:
|
||||||
- "${MAIN_PORT}:10000"
|
- "${MAIN_PORT}:10000"
|
||||||
|
@ -36,6 +36,8 @@ services:
|
||||||
- couchdb-service
|
- couchdb-service
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "host.docker.internal:host-gateway"
|
- "host.docker.internal:host-gateway"
|
||||||
|
environment:
|
||||||
|
- PROXY_ADDRESS=${PROXY_ADDRESS}
|
||||||
|
|
||||||
couchdb-service:
|
couchdb-service:
|
||||||
# platform: linux/amd64
|
# platform: linux/amd64
|
||||||
|
|
|
@ -82,6 +82,12 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- PROXY_RATE_LIMIT_WEBHOOKS_PER_SECOND=10
|
- PROXY_RATE_LIMIT_WEBHOOKS_PER_SECOND=10
|
||||||
- PROXY_RATE_LIMIT_API_PER_SECOND=20
|
- PROXY_RATE_LIMIT_API_PER_SECOND=20
|
||||||
|
- APPS_UPSTREAM_URL=http://app-service:4002
|
||||||
|
- WORKER_UPSTREAM_URL=http://worker-service:4003
|
||||||
|
- MINIO_UPSTREAM_URL=http://minio-service:9000
|
||||||
|
- COUCHDB_UPSTREAM_URL=http://couchdb-service:5984
|
||||||
|
- WATCHTOWER_UPSTREAM_URL=http://watchtower-service:8080
|
||||||
|
- RESOLVER=127.0.0.11
|
||||||
depends_on:
|
depends_on:
|
||||||
- minio-service
|
- minio-service
|
||||||
- worker-service
|
- worker-service
|
||||||
|
|
|
@ -25,17 +25,17 @@ http {
|
||||||
}
|
}
|
||||||
|
|
||||||
upstream app-service {
|
upstream app-service {
|
||||||
server {{address}}:4001;
|
server ${PROXY_ADDRESS}:4001;
|
||||||
keepalive 32;
|
keepalive 32;
|
||||||
}
|
}
|
||||||
|
|
||||||
upstream worker-service {
|
upstream worker-service {
|
||||||
server {{address}}:4002;
|
server ${PROXY_ADDRESS}:4002;
|
||||||
keepalive 32;
|
keepalive 32;
|
||||||
}
|
}
|
||||||
|
|
||||||
upstream builder {
|
upstream builder {
|
||||||
server {{address}}:3000;
|
server ${PROXY_ADDRESS}:3000;
|
||||||
keepalive 32;
|
keepalive 32;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ FROM nginx:latest
|
||||||
# use the default nginx behaviour for *.template files which are processed with envsubst
|
# use the default nginx behaviour for *.template files which are processed with envsubst
|
||||||
# override the output dir to output directly to /etc/nginx instead of /etc/nginx/conf.d
|
# override the output dir to output directly to /etc/nginx instead of /etc/nginx/conf.d
|
||||||
ENV NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx
|
ENV NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx
|
||||||
COPY .generated-nginx.prod.conf /etc/nginx/templates/nginx.conf.template
|
COPY nginx.prod.conf /etc/nginx/templates/nginx.conf.template
|
||||||
|
|
||||||
# IPv6 removal needs to happen after envsubst
|
# IPv6 removal needs to happen after envsubst
|
||||||
RUN rm -rf /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
|
RUN rm -rf /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
|
||||||
|
@ -16,4 +16,11 @@ COPY error.html /usr/share/nginx/html/error.html
|
||||||
|
|
||||||
# Default environment
|
# Default environment
|
||||||
ENV PROXY_RATE_LIMIT_WEBHOOKS_PER_SECOND=10
|
ENV PROXY_RATE_LIMIT_WEBHOOKS_PER_SECOND=10
|
||||||
ENV PROXY_RATE_LIMIT_API_PER_SECOND=20
|
ENV PROXY_RATE_LIMIT_API_PER_SECOND=20
|
||||||
|
# Use docker-compose values as defaults for backwards compatibility
|
||||||
|
ENV APPS_UPSTREAM_URL=http://app-service:4002
|
||||||
|
ENV WORKER_UPSTREAM_URL=http://worker-service:4003
|
||||||
|
ENV MINIO_UPSTREAM_URL=http://minio-service:9000
|
||||||
|
ENV COUCHDB_UPSTREAM_URL=http://couchdb-service:5984
|
||||||
|
ENV WATCHTOWER_UPSTREAM_URL=http://watchtower-service:8080
|
||||||
|
ENV RESOLVER=127.0.0.11
|
||||||
|
|
|
@ -23,7 +23,7 @@ http {
|
||||||
tcp_nodelay on;
|
tcp_nodelay on;
|
||||||
server_tokens off;
|
server_tokens off;
|
||||||
types_hash_max_size 2048;
|
types_hash_max_size 2048;
|
||||||
resolver {{ resolver }} valid=10s ipv6=off;
|
resolver ${RESOLVER} valid=10s ipv6=off;
|
||||||
|
|
||||||
# buffering
|
# buffering
|
||||||
client_header_buffer_size 1k;
|
client_header_buffer_size 1k;
|
||||||
|
@ -76,27 +76,23 @@ http {
|
||||||
add_header Content-Security-Policy "${csp_default}; ${csp_script}; ${csp_style}; ${csp_object}; ${csp_base_uri}; ${csp_connect}; ${csp_font}; ${csp_frame}; ${csp_img}; ${csp_manifest}; ${csp_media}; ${csp_worker};" always;
|
add_header Content-Security-Policy "${csp_default}; ${csp_script}; ${csp_style}; ${csp_object}; ${csp_base_uri}; ${csp_connect}; ${csp_font}; ${csp_frame}; ${csp_img}; ${csp_manifest}; ${csp_media}; ${csp_worker};" always;
|
||||||
|
|
||||||
# upstreams
|
# upstreams
|
||||||
set $apps {{ apps }};
|
set $apps ${APPS_UPSTREAM_URL};
|
||||||
set $worker {{ worker }};
|
set $worker ${WORKER_UPSTREAM_URL};
|
||||||
set $minio {{ minio }};
|
set $minio ${MINIO_UPSTREAM_URL};
|
||||||
set $couchdb {{ couchdb }};
|
set $couchdb ${COUCHDB_UPSTREAM_URL};
|
||||||
{{#if watchtower}}
|
set $watchtower ${WATCHTOWER_UPSTREAM_URL};
|
||||||
set $watchtower {{ watchtower }};
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
location /app {
|
location /app {
|
||||||
proxy_pass http://$apps:4002;
|
proxy_pass $apps;
|
||||||
}
|
}
|
||||||
|
|
||||||
location = / {
|
location = / {
|
||||||
proxy_pass http://$apps:4002;
|
proxy_pass $apps;
|
||||||
}
|
}
|
||||||
|
|
||||||
{{#if watchtower}}
|
|
||||||
location = /v1/update {
|
location = /v1/update {
|
||||||
proxy_pass http://$watchtower:8080;
|
proxy_pass $watchtower;
|
||||||
}
|
}
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
location ~ ^/(builder|app_) {
|
location ~ ^/(builder|app_) {
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
|
@ -107,19 +103,17 @@ http {
|
||||||
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 Host $host;
|
proxy_set_header Host $host;
|
||||||
|
|
||||||
proxy_pass http://$apps:4002;
|
proxy_pass $apps;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ ^/api/(system|admin|global)/ {
|
location ~ ^/api/(system|admin|global)/ {
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
|
proxy_pass $worker;
|
||||||
proxy_pass http://$worker:4003;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
location /worker/ {
|
location /worker/ {
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
|
proxy_pass $worker;
|
||||||
proxy_pass http://$worker:4003;
|
|
||||||
rewrite ^/worker/(.*)$ /$1 break;
|
rewrite ^/worker/(.*)$ /$1 break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,7 +132,7 @@ 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_pass http://$apps:4002;
|
proxy_pass $apps;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /api/ {
|
location /api/ {
|
||||||
|
@ -157,7 +151,7 @@ http {
|
||||||
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 Host $host;
|
proxy_set_header Host $host;
|
||||||
|
|
||||||
proxy_pass http://$apps:4002;
|
proxy_pass $apps;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /api/webhooks/ {
|
location /api/webhooks/ {
|
||||||
|
@ -177,11 +171,11 @@ http {
|
||||||
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 Host $host;
|
proxy_set_header Host $host;
|
||||||
|
|
||||||
proxy_pass http://$apps:4002;
|
proxy_pass $apps;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /db/ {
|
location /db/ {
|
||||||
proxy_pass http://$couchdb:5984;
|
proxy_pass $couchdb;
|
||||||
rewrite ^/db/(.*)$ /$1 break;
|
rewrite ^/db/(.*)$ /$1 break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -191,7 +185,7 @@ http {
|
||||||
proxy_set_header Connection 'upgrade';
|
proxy_set_header Connection 'upgrade';
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_cache_bypass $http_upgrade;
|
proxy_cache_bypass $http_upgrade;
|
||||||
proxy_pass http://$apps:4002;
|
proxy_pass $apps;
|
||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
|
@ -205,7 +199,7 @@ http {
|
||||||
proxy_set_header Connection "";
|
proxy_set_header Connection "";
|
||||||
chunked_transfer_encoding off;
|
chunked_transfer_encoding off;
|
||||||
|
|
||||||
proxy_pass http://$minio:9000;
|
proxy_pass $minio;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /files/signed/ {
|
location /files/signed/ {
|
||||||
|
@ -224,7 +218,7 @@ http {
|
||||||
proxy_set_header Connection "";
|
proxy_set_header Connection "";
|
||||||
chunked_transfer_encoding off;
|
chunked_transfer_encoding off;
|
||||||
|
|
||||||
proxy_pass http://$minio:9000;
|
proxy_pass $minio;
|
||||||
rewrite ^/files/signed/(.*)$ /$1 break;
|
rewrite ^/files/signed/(.*)$ /$1 break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "2.2.10-alpha.3",
|
"version": "2.2.10-alpha.7",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
|
|
10
package.json
10
package.json
|
@ -56,15 +56,11 @@
|
||||||
"test:e2e:ci:record": "lerna run cy:ci:record --stream",
|
"test:e2e:ci:record": "lerna run cy:ci:record --stream",
|
||||||
"test:e2e:ci:notify": "lerna run cy:ci:notify",
|
"test:e2e:ci:notify": "lerna run cy:ci:notify",
|
||||||
"build:specs": "lerna run specs",
|
"build:specs": "lerna run specs",
|
||||||
"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": "lerna run build:docker && npm run build:docker:proxy && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh $BUDIBASE_RELEASE_VERSION && cd -",
|
||||||
"build:docker:pre": "lerna run build && lerna run predocker",
|
"build:docker:pre": "lerna run build && lerna run predocker",
|
||||||
"build:docker:proxy": "docker build hosting/proxy -t proxy-service",
|
"build:docker:proxy": "docker build hosting/proxy -t proxy-service",
|
||||||
"build:docker:proxy:compose": "node scripts/proxy/generateProxyConfig compose && npm run build:docker:proxy",
|
|
||||||
"build:docker:proxy:preprod": "node scripts/proxy/generateProxyConfig preprod && npm run build:docker:proxy",
|
|
||||||
"build:docker:proxy:release": "node scripts/proxy/generateProxyConfig release && npm run build:docker:proxy",
|
|
||||||
"build:docker:proxy:prod": "node scripts/proxy/generateProxyConfig 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:compose && 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",
|
||||||
"build:digitalocean": "cd hosting/digitalocean && ./build.sh && cd -",
|
"build:digitalocean": "cd hosting/digitalocean && ./build.sh && cd -",
|
||||||
"build:docker:single:multiarch": "docker buildx build --platform linux/arm64,linux/amd64 -f hosting/single/Dockerfile -t budibase:latest .",
|
"build:docker:single:multiarch": "docker buildx build --platform linux/arm64,linux/amd64 -f hosting/single/Dockerfile -t budibase:latest .",
|
||||||
|
@ -88,4 +84,4 @@
|
||||||
"install:pro": "bash scripts/pro/install.sh",
|
"install:pro": "bash scripts/pro/install.sh",
|
||||||
"dep:clean": "yarn clean && yarn bootstrap"
|
"dep:clean": "yarn clean && yarn bootstrap"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,2 +0,0 @@
|
||||||
*
|
|
||||||
!dist/*
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/backend-core",
|
"name": "@budibase/backend-core",
|
||||||
"version": "2.2.10-alpha.3",
|
"version": "2.2.10-alpha.7",
|
||||||
"description": "Budibase backend core libraries used in server and worker",
|
"description": "Budibase backend core libraries used in server and worker",
|
||||||
"main": "dist/src/index.js",
|
"main": "dist/src/index.js",
|
||||||
"types": "dist/src/index.d.ts",
|
"types": "dist/src/index.d.ts",
|
||||||
|
@ -15,13 +15,15 @@
|
||||||
"prebuild": "rimraf dist/",
|
"prebuild": "rimraf dist/",
|
||||||
"prepack": "cp package.json dist",
|
"prepack": "cp package.json dist",
|
||||||
"build": "tsc -p tsconfig.build.json",
|
"build": "tsc -p tsconfig.build.json",
|
||||||
|
"build:pro": "../../scripts/pro/build.sh",
|
||||||
|
"postbuild": "yarn run build:pro",
|
||||||
"build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput",
|
"build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput",
|
||||||
"test": "jest --coverage --maxWorkers=2",
|
"test": "jest --coverage --maxWorkers=2",
|
||||||
"test:watch": "jest --watchAll"
|
"test:watch": "jest --watchAll"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/nano": "10.1.1",
|
"@budibase/nano": "10.1.1",
|
||||||
"@budibase/types": "2.2.10-alpha.3",
|
"@budibase/types": "2.2.10-alpha.7",
|
||||||
"@shopify/jest-koa-mocks": "5.0.1",
|
"@shopify/jest-koa-mocks": "5.0.1",
|
||||||
"@techpass/passport-openidconnect": "0.3.2",
|
"@techpass/passport-openidconnect": "0.3.2",
|
||||||
"aws-cloudfront-sign": "2.2.0",
|
"aws-cloudfront-sign": "2.2.0",
|
||||||
|
|
|
@ -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": "2.2.10-alpha.3",
|
"version": "2.2.10-alpha.7",
|
||||||
"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",
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@adobe/spectrum-css-workflow-icons": "1.2.1",
|
"@adobe/spectrum-css-workflow-icons": "1.2.1",
|
||||||
"@budibase/string-templates": "2.2.10-alpha.3",
|
"@budibase/string-templates": "2.2.10-alpha.7",
|
||||||
"@spectrum-css/actionbutton": "1.0.1",
|
"@spectrum-css/actionbutton": "1.0.1",
|
||||||
"@spectrum-css/actiongroup": "1.0.1",
|
"@spectrum-css/actiongroup": "1.0.1",
|
||||||
"@spectrum-css/avatar": "3.0.2",
|
"@spectrum-css/avatar": "3.0.2",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/builder",
|
"name": "@budibase/builder",
|
||||||
"version": "2.2.10-alpha.3",
|
"version": "2.2.10-alpha.7",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -71,10 +71,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "2.2.10-alpha.3",
|
"@budibase/bbui": "2.2.10-alpha.7",
|
||||||
"@budibase/client": "2.2.10-alpha.3",
|
"@budibase/client": "2.2.10-alpha.7",
|
||||||
"@budibase/frontend-core": "2.2.10-alpha.3",
|
"@budibase/frontend-core": "2.2.10-alpha.7",
|
||||||
"@budibase/string-templates": "2.2.10-alpha.3",
|
"@budibase/string-templates": "2.2.10-alpha.7",
|
||||||
"@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",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/cli",
|
"name": "@budibase/cli",
|
||||||
"version": "2.2.10-alpha.3",
|
"version": "2.2.10-alpha.7",
|
||||||
"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": {
|
||||||
|
@ -26,9 +26,9 @@
|
||||||
"outputPath": "build"
|
"outputPath": "build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/backend-core": "2.2.10-alpha.3",
|
"@budibase/backend-core": "2.2.10-alpha.7",
|
||||||
"@budibase/string-templates": "2.2.10-alpha.3",
|
"@budibase/string-templates": "2.2.10-alpha.7",
|
||||||
"@budibase/types": "2.2.10-alpha.3",
|
"@budibase/types": "2.2.10-alpha.7",
|
||||||
"axios": "0.21.2",
|
"axios": "0.21.2",
|
||||||
"chalk": "4.1.0",
|
"chalk": "4.1.0",
|
||||||
"cli-progress": "3.11.2",
|
"cli-progress": "3.11.2",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/client",
|
"name": "@budibase/client",
|
||||||
"version": "2.2.10-alpha.3",
|
"version": "2.2.10-alpha.7",
|
||||||
"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,9 +19,9 @@
|
||||||
"dev:builder": "rollup -cw"
|
"dev:builder": "rollup -cw"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "2.2.10-alpha.3",
|
"@budibase/bbui": "2.2.10-alpha.7",
|
||||||
"@budibase/frontend-core": "2.2.10-alpha.3",
|
"@budibase/frontend-core": "2.2.10-alpha.7",
|
||||||
"@budibase/string-templates": "2.2.10-alpha.3",
|
"@budibase/string-templates": "2.2.10-alpha.7",
|
||||||
"@spectrum-css/button": "^3.0.3",
|
"@spectrum-css/button": "^3.0.3",
|
||||||
"@spectrum-css/card": "^3.0.3",
|
"@spectrum-css/card": "^3.0.3",
|
||||||
"@spectrum-css/divider": "^1.0.3",
|
"@spectrum-css/divider": "^1.0.3",
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/frontend-core",
|
"name": "@budibase/frontend-core",
|
||||||
"version": "2.2.10-alpha.3",
|
"version": "2.2.10-alpha.7",
|
||||||
"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": "2.2.10-alpha.3",
|
"@budibase/bbui": "2.2.10-alpha.7",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"svelte": "^3.46.2"
|
"svelte": "^3.46.2"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/sdk",
|
"name": "@budibase/sdk",
|
||||||
"version": "2.2.10-alpha.3",
|
"version": "2.2.10-alpha.7",
|
||||||
"description": "Budibase Public API SDK",
|
"description": "Budibase Public API SDK",
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/server",
|
"name": "@budibase/server",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "2.2.10-alpha.3",
|
"version": "2.2.10-alpha.7",
|
||||||
"description": "Budibase Web Server",
|
"description": "Budibase Web Server",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -43,11 +43,11 @@
|
||||||
"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": "2.2.10-alpha.3",
|
"@budibase/backend-core": "2.2.10-alpha.7",
|
||||||
"@budibase/client": "2.2.10-alpha.3",
|
"@budibase/client": "2.2.10-alpha.7",
|
||||||
"@budibase/pro": "2.2.10-alpha.3",
|
"@budibase/pro": "2.2.10-alpha.7",
|
||||||
"@budibase/string-templates": "2.2.10-alpha.3",
|
"@budibase/string-templates": "2.2.10-alpha.7",
|
||||||
"@budibase/types": "2.2.10-alpha.3",
|
"@budibase/types": "2.2.10-alpha.7",
|
||||||
"@bull-board/api": "3.7.0",
|
"@bull-board/api": "3.7.0",
|
||||||
"@bull-board/koa": "3.9.4",
|
"@bull-board/koa": "3.9.4",
|
||||||
"@elastic/elasticsearch": "7.10.0",
|
"@elastic/elasticsearch": "7.10.0",
|
||||||
|
|
|
@ -3,7 +3,6 @@ const compose = require("docker-compose")
|
||||||
const path = require("path")
|
const path = require("path")
|
||||||
const fs = require("fs")
|
const fs = require("fs")
|
||||||
const isWsl = require("is-wsl")
|
const isWsl = require("is-wsl")
|
||||||
const { processStringSync } = require("@budibase/string-templates")
|
|
||||||
|
|
||||||
function isLinux() {
|
function isLinux() {
|
||||||
return !isWsl && process.platform !== "darwin" && process.platform !== "win32"
|
return !isWsl && process.platform !== "darwin" && process.platform !== "win32"
|
||||||
|
@ -23,16 +22,6 @@ const Commands = {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
// generate nginx file, always do this incase it has changed
|
|
||||||
const hostingPath = path.join(process.cwd(), "..", "..", "hosting")
|
|
||||||
const nginxHbsPath = path.join(hostingPath, "nginx.dev.conf.hbs")
|
|
||||||
const nginxOutputPath = path.join(hostingPath, ".generated-nginx.dev.conf")
|
|
||||||
const contents = fs.readFileSync(nginxHbsPath, "utf8")
|
|
||||||
const config = {
|
|
||||||
address: isLinux() ? "172.17.0.1" : "host.docker.internal",
|
|
||||||
}
|
|
||||||
fs.writeFileSync(nginxOutputPath, processStringSync(contents, config))
|
|
||||||
|
|
||||||
const envFilePath = path.join(process.cwd(), ".env")
|
const envFilePath = path.join(process.cwd(), ".env")
|
||||||
if (!fs.existsSync(envFilePath)) {
|
if (!fs.existsSync(envFilePath)) {
|
||||||
const envFileJson = {
|
const envFileJson = {
|
||||||
|
@ -60,6 +49,7 @@ async function init() {
|
||||||
BB_ADMIN_USER_PASSWORD: "",
|
BB_ADMIN_USER_PASSWORD: "",
|
||||||
PLUGINS_DIR: "",
|
PLUGINS_DIR: "",
|
||||||
TENANT_FEATURE_FLAGS: "*:LICENSING,*:USER_GROUPS",
|
TENANT_FEATURE_FLAGS: "*:LICENSING,*:USER_GROUPS",
|
||||||
|
PROXY_ADDRESS: isLinux() ? "172.17.0.1" : "host.docker.internal",
|
||||||
}
|
}
|
||||||
let envFile = ""
|
let envFile = ""
|
||||||
Object.keys(envFileJson).forEach(key => {
|
Object.keys(envFileJson).forEach(key => {
|
||||||
|
|
|
@ -1273,13 +1273,13 @@
|
||||||
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/backend-core@2.2.10-alpha.3":
|
"@budibase/backend-core@2.2.10-alpha.7":
|
||||||
version "2.2.10-alpha.3"
|
version "2.2.10-alpha.7"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.2.10-alpha.3.tgz#ab716813b47f3b6273374a8ec99a879ca0ba287a"
|
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.2.10-alpha.7.tgz#f8da10067464f1417ccae81e57a537458e8dde1c"
|
||||||
integrity sha512-r9UBi66yZVIyU0XU0uigdBqmkygZR+ZTn17JGpR5YDjcKRQzV60ONFbJuy3yjCJJV6MPm+6go8tzpKHLsUWqkQ==
|
integrity sha512-dpYr0N8vhbHHQA6tkot6ztB9JC0zvQusfRDOLEwFTePahtZJfdAR6EJs2taf3VrTsSNf8U4UmgS5crfHa3v2kA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@budibase/nano" "10.1.1"
|
"@budibase/nano" "10.1.1"
|
||||||
"@budibase/types" "2.2.10-alpha.3"
|
"@budibase/types" "2.2.10-alpha.7"
|
||||||
"@shopify/jest-koa-mocks" "5.0.1"
|
"@shopify/jest-koa-mocks" "5.0.1"
|
||||||
"@techpass/passport-openidconnect" "0.3.2"
|
"@techpass/passport-openidconnect" "0.3.2"
|
||||||
aws-cloudfront-sign "2.2.0"
|
aws-cloudfront-sign "2.2.0"
|
||||||
|
@ -1373,13 +1373,13 @@
|
||||||
qs "^6.11.0"
|
qs "^6.11.0"
|
||||||
tough-cookie "^4.1.2"
|
tough-cookie "^4.1.2"
|
||||||
|
|
||||||
"@budibase/pro@2.2.10-alpha.3":
|
"@budibase/pro@2.2.10-alpha.7":
|
||||||
version "2.2.10-alpha.3"
|
version "2.2.10-alpha.7"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.2.10-alpha.3.tgz#bee4b40cd8dc77ca88108acc0aa585f05494b7f4"
|
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.2.10-alpha.7.tgz#83ce8ca3c97eae2effab5db4244367420a39117d"
|
||||||
integrity sha512-eXTG9GEuy8wdl6V+NM9ws4aHyDJoiypR62TQirB69V3qQFPa6eKoKL8d6Ck2c+HBYcXowDe7Lj9MEj1lkSochg==
|
integrity sha512-1xtQgKQC2PSZLBBQxDcxkz9eDRmYfA/ziz/V6M86PN9t6g2ulFsFVhQo2C86CQZ6OtIWAPNGEpNNwc12+sm0uQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@budibase/backend-core" "2.2.10-alpha.3"
|
"@budibase/backend-core" "2.2.10-alpha.7"
|
||||||
"@budibase/types" "2.2.10-alpha.3"
|
"@budibase/types" "2.2.10-alpha.7"
|
||||||
"@koa/router" "8.0.8"
|
"@koa/router" "8.0.8"
|
||||||
bull "4.10.1"
|
bull "4.10.1"
|
||||||
joi "17.6.0"
|
joi "17.6.0"
|
||||||
|
@ -1404,10 +1404,10 @@
|
||||||
svelte-apexcharts "^1.0.2"
|
svelte-apexcharts "^1.0.2"
|
||||||
svelte-flatpickr "^3.1.0"
|
svelte-flatpickr "^3.1.0"
|
||||||
|
|
||||||
"@budibase/types@2.2.10-alpha.3":
|
"@budibase/types@2.2.10-alpha.7":
|
||||||
version "2.2.10-alpha.3"
|
version "2.2.10-alpha.7"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.2.10-alpha.3.tgz#7a5312f9f611d65ef8aecb5a56eb742484ab436f"
|
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.2.10-alpha.7.tgz#e39e57367d065111f07d2b1144b2da44c77009c2"
|
||||||
integrity sha512-uLkQtL2PbURew4nCZ72/T5dl1pGnx/95UzOpK7yeFO3g+3T63IrWcOCAoSigZnOfyY+3CvHfc0tV3+Y3UfTNww==
|
integrity sha512-tl3adxi6oX3piAH/DMlrTuXxvHbFDL201I/a+9a4gOjvYSFRmJJrmlNx34hWzbepcNAg9Vb/ZwUv8k8DfdvOrw==
|
||||||
|
|
||||||
"@bull-board/api@3.7.0":
|
"@bull-board/api@3.7.0":
|
||||||
version "3.7.0"
|
version "3.7.0"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/string-templates",
|
"name": "@budibase/string-templates",
|
||||||
"version": "2.2.10-alpha.3",
|
"version": "2.2.10-alpha.7",
|
||||||
"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,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/types",
|
"name": "@budibase/types",
|
||||||
"version": "2.2.10-alpha.3",
|
"version": "2.2.10-alpha.7",
|
||||||
"description": "Budibase types",
|
"description": "Budibase types",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/worker",
|
"name": "@budibase/worker",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "2.2.10-alpha.3",
|
"version": "2.2.10-alpha.7",
|
||||||
"description": "Budibase background service",
|
"description": "Budibase background service",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -36,10 +36,10 @@
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/backend-core": "2.2.10-alpha.3",
|
"@budibase/backend-core": "2.2.10-alpha.7",
|
||||||
"@budibase/pro": "2.2.10-alpha.3",
|
"@budibase/pro": "2.2.10-alpha.7",
|
||||||
"@budibase/string-templates": "2.2.10-alpha.3",
|
"@budibase/string-templates": "2.2.10-alpha.7",
|
||||||
"@budibase/types": "2.2.10-alpha.3",
|
"@budibase/types": "2.2.10-alpha.7",
|
||||||
"@koa/router": "8.0.8",
|
"@koa/router": "8.0.8",
|
||||||
"@sentry/node": "6.17.7",
|
"@sentry/node": "6.17.7",
|
||||||
"@techpass/passport-openidconnect": "0.3.2",
|
"@techpass/passport-openidconnect": "0.3.2",
|
||||||
|
|
|
@ -470,13 +470,13 @@
|
||||||
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/backend-core@2.2.10-alpha.3":
|
"@budibase/backend-core@2.2.10-alpha.7":
|
||||||
version "2.2.10-alpha.3"
|
version "2.2.10-alpha.7"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.2.10-alpha.3.tgz#ab716813b47f3b6273374a8ec99a879ca0ba287a"
|
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.2.10-alpha.7.tgz#f8da10067464f1417ccae81e57a537458e8dde1c"
|
||||||
integrity sha512-r9UBi66yZVIyU0XU0uigdBqmkygZR+ZTn17JGpR5YDjcKRQzV60ONFbJuy3yjCJJV6MPm+6go8tzpKHLsUWqkQ==
|
integrity sha512-dpYr0N8vhbHHQA6tkot6ztB9JC0zvQusfRDOLEwFTePahtZJfdAR6EJs2taf3VrTsSNf8U4UmgS5crfHa3v2kA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@budibase/nano" "10.1.1"
|
"@budibase/nano" "10.1.1"
|
||||||
"@budibase/types" "2.2.10-alpha.3"
|
"@budibase/types" "2.2.10-alpha.7"
|
||||||
"@shopify/jest-koa-mocks" "5.0.1"
|
"@shopify/jest-koa-mocks" "5.0.1"
|
||||||
"@techpass/passport-openidconnect" "0.3.2"
|
"@techpass/passport-openidconnect" "0.3.2"
|
||||||
aws-cloudfront-sign "2.2.0"
|
aws-cloudfront-sign "2.2.0"
|
||||||
|
@ -520,23 +520,23 @@
|
||||||
qs "^6.11.0"
|
qs "^6.11.0"
|
||||||
tough-cookie "^4.1.2"
|
tough-cookie "^4.1.2"
|
||||||
|
|
||||||
"@budibase/pro@2.2.10-alpha.3":
|
"@budibase/pro@2.2.10-alpha.7":
|
||||||
version "2.2.10-alpha.3"
|
version "2.2.10-alpha.7"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.2.10-alpha.3.tgz#bee4b40cd8dc77ca88108acc0aa585f05494b7f4"
|
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.2.10-alpha.7.tgz#83ce8ca3c97eae2effab5db4244367420a39117d"
|
||||||
integrity sha512-eXTG9GEuy8wdl6V+NM9ws4aHyDJoiypR62TQirB69V3qQFPa6eKoKL8d6Ck2c+HBYcXowDe7Lj9MEj1lkSochg==
|
integrity sha512-1xtQgKQC2PSZLBBQxDcxkz9eDRmYfA/ziz/V6M86PN9t6g2ulFsFVhQo2C86CQZ6OtIWAPNGEpNNwc12+sm0uQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@budibase/backend-core" "2.2.10-alpha.3"
|
"@budibase/backend-core" "2.2.10-alpha.7"
|
||||||
"@budibase/types" "2.2.10-alpha.3"
|
"@budibase/types" "2.2.10-alpha.7"
|
||||||
"@koa/router" "8.0.8"
|
"@koa/router" "8.0.8"
|
||||||
bull "4.10.1"
|
bull "4.10.1"
|
||||||
joi "17.6.0"
|
joi "17.6.0"
|
||||||
jsonwebtoken "8.5.1"
|
jsonwebtoken "8.5.1"
|
||||||
node-fetch "^2.6.1"
|
node-fetch "^2.6.1"
|
||||||
|
|
||||||
"@budibase/types@2.2.10-alpha.3":
|
"@budibase/types@2.2.10-alpha.7":
|
||||||
version "2.2.10-alpha.3"
|
version "2.2.10-alpha.7"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.2.10-alpha.3.tgz#7a5312f9f611d65ef8aecb5a56eb742484ab436f"
|
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.2.10-alpha.7.tgz#e39e57367d065111f07d2b1144b2da44c77009c2"
|
||||||
integrity sha512-uLkQtL2PbURew4nCZ72/T5dl1pGnx/95UzOpK7yeFO3g+3T63IrWcOCAoSigZnOfyY+3CvHfc0tV3+Y3UfTNww==
|
integrity sha512-tl3adxi6oX3piAH/DMlrTuXxvHbFDL201I/a+9a4gOjvYSFRmJJrmlNx34hWzbepcNAg9Vb/ZwUv8k8DfdvOrw==
|
||||||
|
|
||||||
"@cspotcode/source-map-support@^0.8.0":
|
"@cspotcode/source-map-support@^0.8.0":
|
||||||
version "0.8.1"
|
version "0.8.1"
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# This script is designed for building the pro repo after the backend-core build has completed.
|
||||||
|
# This ensures that any changes in core that are required by pro are done in the correct order.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Go to parent of budibase
|
||||||
|
cd ../../../
|
||||||
|
|
||||||
|
if [[ -d "budibase-pro" ]]; then
|
||||||
|
cd budibase-pro
|
||||||
|
echo "Building pro"
|
||||||
|
yarn build
|
||||||
|
fi
|
|
@ -35,5 +35,5 @@ if [[ -d "budibase-pro" ]]; then
|
||||||
git pull
|
git pull
|
||||||
|
|
||||||
echo "Initializing pro repo..."
|
echo "Initializing pro repo..."
|
||||||
yarn setup
|
yarn
|
||||||
fi
|
fi
|
|
@ -1,111 +0,0 @@
|
||||||
#!/usr/bin/env node
|
|
||||||
const path = require("path")
|
|
||||||
const fs = require("fs")
|
|
||||||
|
|
||||||
function processStringSync(string, env) {
|
|
||||||
let output = ""
|
|
||||||
|
|
||||||
// process if statements
|
|
||||||
let removal = false
|
|
||||||
for (let line of string.split("\n")) {
|
|
||||||
if (new RegExp(`{{\/if}}`, "g").test(line)) {
|
|
||||||
removal = false
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!removal) {
|
|
||||||
const match = line.match(new RegExp(`{{#if (.*)}}`))
|
|
||||||
if (match) {
|
|
||||||
const key = match[1]
|
|
||||||
// check the if statement is true
|
|
||||||
if (!env[key]) {
|
|
||||||
removal = true
|
|
||||||
}
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
output += line + "\n"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let key in env) {
|
|
||||||
// replace variables
|
|
||||||
const rgx = new RegExp(`{{\\s*${key}\\s*}}`, "g")
|
|
||||||
output = output.replace(rgx, env[key])
|
|
||||||
}
|
|
||||||
|
|
||||||
return output
|
|
||||||
}
|
|
||||||
|
|
||||||
const Configs = {
|
|
||||||
prod: {
|
|
||||||
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",
|
|
||||||
resolver: "kube-dns.kube-system.svc.cluster.local"
|
|
||||||
},
|
|
||||||
preprod: {
|
|
||||||
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",
|
|
||||||
resolver: "kube-dns.kube-system.svc.cluster.local"
|
|
||||||
},
|
|
||||||
release: {
|
|
||||||
apps: "app-service.budibase.svc.cluster.local",
|
|
||||||
worker: "worker-service.budibase.svc.cluster.local",
|
|
||||||
minio: "minio-service.budibase.svc.cluster.local",
|
|
||||||
couchdb: "budibase-release-svc-couchdb",
|
|
||||||
resolver: "kube-dns.kube-system.svc.cluster.local"
|
|
||||||
},
|
|
||||||
compose: {
|
|
||||||
apps: "app-service",
|
|
||||||
worker: "worker-service",
|
|
||||||
minio: "minio-service",
|
|
||||||
couchdb: "couchdb-service",
|
|
||||||
watchtower: "watchtower-service",
|
|
||||||
resolver: "127.0.0.11"
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
const Commands = {
|
|
||||||
Prod: "prod",
|
|
||||||
Preprod: "preprod",
|
|
||||||
Release: "release",
|
|
||||||
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
|
|
||||||
)
|
|
||||||
})
|
|
Loading…
Reference in New Issue