From 84a16e2dfbd6af630ea65f662c29c7ef5cef4ff6 Mon Sep 17 00:00:00 2001 From: Michael Drury Date: Thu, 17 Dec 2020 12:39:55 +0000 Subject: [PATCH] Renaming deployment service to worker service for its expansion plans. --- hosting/deployment | 1 - hosting/docker-compose.yml | 12 ++++++------ hosting/hosting.properties | 4 ++-- hosting/worker | 1 + packages/{deployment => worker}/.gitignore | 0 packages/{deployment => worker}/Dockerfile | 0 packages/{deployment => worker}/package.json | 0 .../src/api/controllers/deploy.js | 0 packages/{deployment => worker}/src/api/index.js | 0 .../{deployment => worker}/src/api/routes/deploy.js | 0 .../{deployment => worker}/src/api/routes/index.js | 0 packages/{deployment => worker}/src/environment.js | 2 +- packages/{deployment => worker}/src/index.js | 2 +- .../src/middleware/check-key.js | 0 packages/{deployment => worker}/yarn.lock | 0 15 files changed, 11 insertions(+), 11 deletions(-) delete mode 120000 hosting/deployment create mode 120000 hosting/worker rename packages/{deployment => worker}/.gitignore (100%) rename packages/{deployment => worker}/Dockerfile (100%) rename packages/{deployment => worker}/package.json (100%) rename packages/{deployment => worker}/src/api/controllers/deploy.js (100%) rename packages/{deployment => worker}/src/api/index.js (100%) rename packages/{deployment => worker}/src/api/routes/deploy.js (100%) rename packages/{deployment => worker}/src/api/routes/index.js (100%) rename packages/{deployment => worker}/src/environment.js (89%) rename packages/{deployment => worker}/src/index.js (92%) rename packages/{deployment => worker}/src/middleware/check-key.js (100%) rename packages/{deployment => worker}/yarn.lock (100%) diff --git a/hosting/deployment b/hosting/deployment deleted file mode 120000 index 8abcbcdfa3..0000000000 --- a/hosting/deployment +++ /dev/null @@ -1 +0,0 @@ -../packages/deployment/ \ No newline at end of file diff --git a/hosting/docker-compose.yml b/hosting/docker-compose.yml index 2824672722..7f196d4e3b 100644 --- a/hosting/docker-compose.yml +++ b/hosting/docker-compose.yml @@ -17,16 +17,16 @@ services: LOGO_URL: ${LOGO_URL} PORT: ${APP_PORT} depends_on: - - deployment-service + - worker-service - deployment-service: - build: ./deployment + worker-service: + build: ./worker ports: - - "${DEPLOYMENT_PORT}:${DEPLOYMENT_PORT}" + - "${WORKER_PORT}:${WORKER_PORT}" environment: SELF_HOSTED: 1, - DEPLOYMENT_API_KEY: ${DEPLOYMENT_API_KEY} - PORT: ${DEPLOYMENT_PORT} + DEPLOYMENT_API_KEY: ${WORKER_API_KEY} + PORT: ${WORKER_PORT} MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY} MINIO_SECRET_KEY: ${MINIO_SECRET_KEY} RAW_MINIO_URL: http://nginx-service:${MINIO_PORT} diff --git a/hosting/hosting.properties b/hosting/hosting.properties index 8ff1d3d57b..c48d4cc1d8 100644 --- a/hosting/hosting.properties +++ b/hosting/hosting.properties @@ -2,11 +2,11 @@ MINIO_ACCESS_KEY=budibase MINIO_SECRET_KEY=budibase COUCH_DB_PASSWORD=budibase COUCH_DB_USER=budibase -DEPLOYMENT_API_KEY=budibase +WORKER_API_KEY=budibase BUDIBASE_ENVIRONMENT=PRODUCTION HOSTING_URL="http://localhost:4001" LOGO_URL=https://logoipsum.com/logo/logo-15.svg APP_PORT=4002 MINIO_PORT=4003 COUCH_DB_PORT=4004 -DEPLOYMENT_PORT=4006 +WORKER_PORT=4006 diff --git a/hosting/worker b/hosting/worker new file mode 120000 index 0000000000..f1bda392ad --- /dev/null +++ b/hosting/worker @@ -0,0 +1 @@ +../packages/worker/ \ No newline at end of file diff --git a/packages/deployment/.gitignore b/packages/worker/.gitignore similarity index 100% rename from packages/deployment/.gitignore rename to packages/worker/.gitignore diff --git a/packages/deployment/Dockerfile b/packages/worker/Dockerfile similarity index 100% rename from packages/deployment/Dockerfile rename to packages/worker/Dockerfile diff --git a/packages/deployment/package.json b/packages/worker/package.json similarity index 100% rename from packages/deployment/package.json rename to packages/worker/package.json diff --git a/packages/deployment/src/api/controllers/deploy.js b/packages/worker/src/api/controllers/deploy.js similarity index 100% rename from packages/deployment/src/api/controllers/deploy.js rename to packages/worker/src/api/controllers/deploy.js diff --git a/packages/deployment/src/api/index.js b/packages/worker/src/api/index.js similarity index 100% rename from packages/deployment/src/api/index.js rename to packages/worker/src/api/index.js diff --git a/packages/deployment/src/api/routes/deploy.js b/packages/worker/src/api/routes/deploy.js similarity index 100% rename from packages/deployment/src/api/routes/deploy.js rename to packages/worker/src/api/routes/deploy.js diff --git a/packages/deployment/src/api/routes/index.js b/packages/worker/src/api/routes/index.js similarity index 100% rename from packages/deployment/src/api/routes/index.js rename to packages/worker/src/api/routes/index.js diff --git a/packages/deployment/src/environment.js b/packages/worker/src/environment.js similarity index 89% rename from packages/deployment/src/environment.js rename to packages/worker/src/environment.js index 88954a3757..fee1d3be04 100644 --- a/packages/deployment/src/environment.js +++ b/packages/worker/src/environment.js @@ -1,6 +1,6 @@ module.exports = { SELF_HOSTED: process.env.SELF_HOSTED, - DEPLOYMENT_API_KEY: process.env.DEPLOYMENT_API_KEY, + WORKER_API_KEY: process.env.WORKER_API_KEY, PORT: process.env.PORT, MINIO_ACCESS_KEY: process.env.MINIO_ACCESS_KEY, MINIO_SECRET_KEY: process.env.MINIO_SECRET_KEY, diff --git a/packages/deployment/src/index.js b/packages/worker/src/index.js similarity index 92% rename from packages/deployment/src/index.js rename to packages/worker/src/index.js index 82d67fbf09..2cc78cce2d 100644 --- a/packages/deployment/src/index.js +++ b/packages/worker/src/index.js @@ -33,7 +33,7 @@ destroyable(server) server.on("close", () => console.log("Server Closed")) module.exports = server.listen(env.PORT || 4002, async () => { - console.log(`Deployment running on ${JSON.stringify(server.address())}`) + console.log(`Worker running on ${JSON.stringify(server.address())}`) }) process.on("uncaughtException", err => { diff --git a/packages/deployment/src/middleware/check-key.js b/packages/worker/src/middleware/check-key.js similarity index 100% rename from packages/deployment/src/middleware/check-key.js rename to packages/worker/src/middleware/check-key.js diff --git a/packages/deployment/yarn.lock b/packages/worker/yarn.lock similarity index 100% rename from packages/deployment/yarn.lock rename to packages/worker/yarn.lock