forked from bomoko/lagoon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (20 loc) · 972 Bytes
/
Dockerfile
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
ARG LAGOON_GIT_BRANCH
ARG IMAGE_REPO
# STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services
FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder
# STAGE 2: specific service Image
FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10
# Copying generated node_modules from the first stage
COPY --from=yarn-workspace-builder /app /app
# Setting the workdir to the service, all following commands will run from here
WORKDIR /app/services/logs2rocketchat/
# Copying the .env.defaults into the Workdir, as the dotenv system searches within the workdir for it
COPY --from=yarn-workspace-builder /app/.env.defaults .
# Copying files from our service
COPY . .
# Verify that all dependencies have been installed via the yarn-workspace-builder
RUN yarn check --verify-tree
# Making sure we run in production
ENV NODE_ENV production
RUN yarn build
CMD ["yarn", "start"]