-
Notifications
You must be signed in to change notification settings - Fork 27
/
Dockerfile-dev
43 lines (33 loc) · 1.05 KB
/
Dockerfile-dev
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# https://hub.docker.com/_/node/
FROM node:14.16.1-alpine
ARG VCS_REF=not_ci
LABEL org.label-schema.description="PagerDuty on-call dashboard widget" \
org.label-schema.name="PagerBeauty" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="https://work.sergii.org/pagerbeauty" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://github.com/sergiitk/pagerbeauty" \
org.label-schema.vendor="Sergii Tkachenko <[email protected]>"
# Environment
ENV APP_DIR=/usr/src/app
# Create app directory
WORKDIR $APP_DIR
# Install
COPY package.json yarn.lock $APP_DIR/
RUN yarn install --prod --frozen-lockfile \
&& yarn cache clean
# Pagerbeauty default port
EXPOSE 8080
# ---------- Dev image from here
# NPM config and dev environment
RUN npm config set scripts-prepend-node-path true \
&& mkdir -v $APP_DIR/tmp
# Install the rest
RUN yarn install --frozen-lockfile
# Pagerbeauty with HTTP auth
EXPOSE 8081
# Acceptance test mock server
EXPOSE 8090
# Bundle app source
COPY . .
CMD ["yarn", "run", "app"]