Browse Source

Fixed npm run start:prod not able to find build directory (#83)

Alex 3 years ago
parent
commit
23ba651705
3 changed files with 5 additions and 3 deletions
  1. 2 2
      docker/docker-compose.yml
  2. 2 0
      microservices/entrypoint.sh
  3. 1 1
      server/entrypoint.sh

+ 2 - 2
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:

+ 2 - 0
microservices/entrypoint.sh

@@ -0,0 +1,2 @@
+# npm run typeorm migration:run
+npm run build && npm run start:prod

+ 1 - 1
server/entrypoint.sh

@@ -1,2 +1,2 @@
 # npm run typeorm migration:run
-npm run start:dev
+npm run build && npm run start:prod