From 0288c97e3b0fe64232316bf9d293e6899f126999 Mon Sep 17 00:00:00 2001 From: Junseo Park Date: Thu, 25 Feb 2021 15:37:21 +0900 Subject: [PATCH] fix: docker file --- Dockerfile | 3 ++- package.json | 2 +- startup.sh | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 startup.sh diff --git a/Dockerfile b/Dockerfile index 5ec55f1..9646a0d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,4 +40,5 @@ RUN yarn build RUN yarn build # Running the app -CMD './startup.sh' \ No newline at end of file +RUN chmod +x /usr/src/app/startup.sh +CMD yarn start \ No newline at end of file diff --git a/package.json b/package.json index 2385004..7b8afdf 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "dev": "next dev", "build": "next build", - "start": "next start", + "start": "next start & (sleep 1; wget http://localhost:3000/api -O /dev/null)", "lint": "eslint --ext ts,tsx .", "lint:fix": "eslint --ext ts,tsx . --fix", "test": "jest", diff --git a/startup.sh b/startup.sh deleted file mode 100644 index 4ba9285..0000000 --- a/startup.sh +++ /dev/null @@ -1 +0,0 @@ -yarn start & (sleep 1; wget http://localhost:3000/api -O /dev/null) \ No newline at end of file