From 23ba6517058fb413597a1ae64dbb97d6fb4209ca Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 28 Mar 2022 21:00:17 -0500 Subject: [PATCH] Fixed npm run start:prod not able to find build directory (#83) --- docker/docker-compose.yml | 4 ++-- microservices/entrypoint.sh | 2 ++ server/entrypoint.sh | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 microservices/entrypoint.sh diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index efd6bb1c8f..ce43d4c8bf 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -6,7 +6,7 @@ services: build: context: ../server dockerfile: ../server/Dockerfile - command: npm run start:prod + entrypoint: ["/bin/sh", "./entrypoint.sh"] expose: - "3000" volumes: @@ -28,7 +28,7 @@ services: build: context: ../microservices dockerfile: ../microservices/Dockerfile - command: npm run start:prod + entrypoint: ["/bin/sh", "./entrypoint.sh"] expose: - "3001" volumes: diff --git a/microservices/entrypoint.sh b/microservices/entrypoint.sh new file mode 100644 index 0000000000..7dd3325ba4 --- /dev/null +++ b/microservices/entrypoint.sh @@ -0,0 +1,2 @@ +# npm run typeorm migration:run +npm run build && npm run start:prod \ No newline at end of file diff --git a/server/entrypoint.sh b/server/entrypoint.sh index cd13d4545a..7dd3325ba4 100644 --- a/server/entrypoint.sh +++ b/server/entrypoint.sh @@ -1,2 +1,2 @@ # npm run typeorm migration:run -npm run start:dev \ No newline at end of file +npm run build && npm run start:prod \ No newline at end of file