fix: updated to better dockerfile
This commit is contained in:
16
Dockerfile
16
Dockerfile
@@ -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"]
|
||||
|
||||
@@ -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"
|
||||
},
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user