diff --git a/Dockerfile b/Dockerfile index edd81ca..b2434e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ FROM node:alpine AS build -WORKDIR / +WORKDIR /src COPY . . RUN npm ci && npm run build FROM node:alpine WORKDIR /app -COPY --from=build /dist . +COPY --from=build /src/dist . ENTRYPOINT node /app/index.js COPY package* ./ diff --git a/now.json b/now.json index 8ce446e..ec3a494 100644 --- a/now.json +++ b/now.json @@ -1,6 +1,6 @@ { "version": 1, - "type": "npm", + "type": "docker", "alias": [ "badgen.net", "flat.badgen.net" @@ -10,6 +10,7 @@ "package-lock.json", "server.tsconfig.json", "tsconfig.json", + "next-env.d.ts", "next.config.js", "index.ts", "tools", diff --git a/package.json b/package.json index 122bc23..4f920ab 100644 --- a/package.json +++ b/package.json @@ -6,9 +6,9 @@ "private": true, "scripts": { "lint": "standard && standard *.ts", - "build-api": "tsc -p server.tsconfig.json", - "build-web": "next build && next export -o dist", - "build": "npm run tools && npm run build-web && npm run build-api", + "build:api": "tsc -p server.tsconfig.json", + "build:web": "next build && next export -o dist", + "build": "npm run tools && npm run build:web && npm run build:api", "dev": "npm run build && npm run dev:api", "dev:api": "nodemon --config nodemon.json index.ts", "dev:web": "next",