-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (26 loc) · 757 Bytes
/
Dockerfile
File metadata and controls
28 lines (26 loc) · 757 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# base
FROM pagarme/docker-nodejs:8.11 as base
WORKDIR /boilerplate
COPY .env.* /boilerplate/
COPY package*.json /boilerplate/
RUN apk --update add --no-cache python make g++
# development
FROM pagarme/docker-nodejs:8.11 as development
WORKDIR /boilerplate
ENV DOTENV_PATH .env.example
COPY --from=base /boilerplate .
RUN npm install
ENV NODE_ENV=development
COPY scripts /boilerplate/scripts
RUN chmod +x /boilerplate/scripts/start_server.sh
COPY src /boilerplate/src
COPY tests /boilerplate/tests
EXPOSE 3000
# production-s
FROM pagarme/docker-nodejs:8.11 as production-s
WORKDIR /boilerplate
COPY scripts /boilerplate/scripts
COPY src /boilerplate/src
ENV NODE_ENV=production
RUN npm install --production
ENTRYPOINT /boilerplate/scripts/start-server.sh