fix: updated to better dockerfile

This commit is contained in:
Andrew Bastin
2021-09-17 13:12:49 +05:30
parent d4392416c8
commit 4407f260ae
3 changed files with 12 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
FROM node:12-alpine
FROM node:lts-alpine
LABEL maintainer="Hoppscotch (support@hoppscotch.io)"
@@ -9,17 +9,19 @@ RUN apk add --update --no-cache \
# Create app directory
WORKDIR /app
COPY package*.json ./
RUN npm install
ADD . /app/
COPY . .
RUN npm install -g pnpm
RUN pnpm i
ENV HOST 0.0.0.0
EXPOSE 3000
RUN mv .env.example .env
RUN mv packages/hoppscotch-app/.env.example packages/hoppscotch-app/.env
CMD ["npm", "run", "dev"]
RUN pnpm -r build-prod
CMD ["pnpm", "run", "start"]

View File

@@ -8,6 +8,8 @@
"preinstall": "npx only-allow pnpm",
"prepare": "husky install",
"dev": "pnpm -r dev",
"build-prod": "pnpm -r build-prod",
"start": "pnpm -r start",
"lintfix": "pnpm -r lintfix",
"pre-commit": "pnpm -r lint"
},

View File

@@ -13,6 +13,7 @@
"build": "vue-tsc --noEmit && nuxt build",
"start": "nuxt start",
"generate": "nuxt generate --modern",
"build-prod": "nuxt generate --modern",
"analyze": "npx nuxt build -a",
"lint:script": "eslint --ext .ts,.js,.vue --ignore-path .gitignore .",
"lint:style": "stylelint **/*.{css,scss,vue} --ignore-path .gitignore",