Add Dockerfile.dev for backend, migrate frontend image to "serve" and change both docker-compose.ymls
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
FROM node:alpine AS builder
|
||||
FROM node:14.3.0-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY ./package.json ./
|
||||
COPY package.json .
|
||||
COPY package-lock.json .
|
||||
RUN npm install
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM node:alpine
|
||||
FROM node:14.3.0-alpine
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app ./
|
||||
COPY --from=builder /app .
|
||||
|
||||
EXPOSE 3000
|
||||
CMD ["npm", "run", "start:prod"]
|
||||
|
||||
12
backend/Dockerfile.dev
Normal file
12
backend/Dockerfile.dev
Normal file
@@ -0,0 +1,12 @@
|
||||
FROM node:14.3.0-alpine AS builder
|
||||
WORKDIR /app
|
||||
ENV ENVIRONMENT dev
|
||||
|
||||
COPY package.json .
|
||||
COPY package-lock.json .
|
||||
RUN npm install
|
||||
COPY . .
|
||||
|
||||
EXPOSE 3000
|
||||
CMD ["npm", "run", "start:${ENVIRONMENT}"]
|
||||
|
||||
Reference in New Issue
Block a user