From 7429b96a712aec23847317058bbdceada172cbc3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 12 Sep 2021 15:03:51 +0200 Subject: [PATCH] Cleanup CF and docker deployment support MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .cfignore | 23 +++++++++++++++++++---- docker/Dockerfile | 2 +- docker/Makefile | 4 ++-- docker/docker-compose.yml | 2 +- src/charging-station/Bootstrap.ts | 2 +- 5 files changed, 24 insertions(+), 9 deletions(-) diff --git a/.cfignore b/.cfignore index 19d6778c..039b2a76 100644 --- a/.cfignore +++ b/.cfignore @@ -9,6 +9,10 @@ .vscode .clinic .tscache +.nycrc.json +.nyc_output +.mocharc.json +.release-it.json .xmake.cfg # Logs *.log @@ -21,10 +25,21 @@ .netrwhist *~ *.orig +*.md +*.db +*-template.* +*.tar.gz +*.mta +mta_archives src -ev-simulator-start.sh -ev-simulator-start.bat -README.md +test +temp +outputs +coverage +charging-stations-simulator-start.sh +charging-stations-simulator-start.bat node_modules -manifest-cf-template.yml +sonar-project.properties +performanceRecords.json +tsconfig*.json mta.yaml diff --git a/docker/Dockerfile b/docker/Dockerfile index 46ca0102..531bb43f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -17,7 +17,7 @@ WORKDIR /usr/app COPY --from=builder /usr/builder/node_modules ./node_modules COPY --from=builder /usr/builder/dist ./dist -COPY NOTICE LICENSE ./ +COPY README.md NOTICE LICENSE ./ COPY docker/autoconfig.sh /autoconfig.sh RUN chmod +x /autoconfig.sh diff --git a/docker/Makefile b/docker/Makefile index 8b02c4fe..422fb1fe 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -1,9 +1,9 @@ PROJECT_NAME?=evse -NAME:=simulator +NAME:=charging-stations-simulator SUBMODULES_INIT?=false DOCKER_ECR_ACCOUNT_ID?=166296450311 DOCKER_ECR_REGION?=eu-west-3 -DOCKER_ECR_REGISTRY_NAME?=ev_simulator +DOCKER_ECR_REGISTRY_NAME?=charging_stations_simulator DOCKER_ECR_TAG?=latest .PHONY: all diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 4da584b6..e34223d7 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -4,7 +4,7 @@ networks: driver: bridge services: - simulator: + charging-stations-simulator: build: context: .. dockerfile: docker/Dockerfile diff --git a/src/charging-station/Bootstrap.ts b/src/charging-station/Bootstrap.ts index f3311672..7fe1ef7b 100644 --- a/src/charging-station/Bootstrap.ts +++ b/src/charging-station/Bootstrap.ts @@ -65,7 +65,7 @@ export default class Bootstrap { if (numStationsTotal === 0) { console.warn(chalk.yellow('No charging station template enabled in configuration, exiting')); } else { - console.log(chalk.green(`Charging station simulator ${this.version} started with ${numStationsTotal.toString()} charging station(s) and ${Utils.workerDynamicPoolInUse() ? `${Configuration.getWorkerPoolMinSize().toString()}/` : ''}${Bootstrap.workerImplementation.size}${Utils.workerPoolInUse() ? `/${Configuration.getWorkerPoolMaxSize().toString()}` : ''} worker(s) concurrently running in '${Configuration.getWorkerProcess()}' mode${Bootstrap.workerImplementation.maxElementsPerWorker ? ` (${Bootstrap.workerImplementation.maxElementsPerWorker} charging station(s) per worker)` : ''}`)); + console.log(chalk.green(`Charging stations simulator ${this.version} started with ${numStationsTotal.toString()} charging station(s) and ${Utils.workerDynamicPoolInUse() ? `${Configuration.getWorkerPoolMinSize().toString()}/` : ''}${Bootstrap.workerImplementation.size}${Utils.workerPoolInUse() ? `/${Configuration.getWorkerPoolMaxSize().toString()}` : ''} worker(s) concurrently running in '${Configuration.getWorkerProcess()}' mode${Bootstrap.workerImplementation.maxElementsPerWorker ? ` (${Bootstrap.workerImplementation.maxElementsPerWorker} charging station(s) per worker)` : ''}`)); } this.started = true; } catch (error) { -- 2.34.1