Setup Woodpecker CI config
This commit is contained in:
27
Dockerfile
27
Dockerfile
@@ -1,16 +1,17 @@
|
||||
FROM node:16
|
||||
|
||||
RUN mkdir /app
|
||||
|
||||
COPY package.json /app
|
||||
COPY yarn.lock /app
|
||||
|
||||
RUN cd /app && yarn install
|
||||
|
||||
COPY . /app
|
||||
|
||||
RUN rm -rf /app/.env
|
||||
RUN touch /app/.env
|
||||
FROM node:16-bullseye
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Dependencies first so the install layer caches independently of app source.
|
||||
COPY package.json yarn.lock ./
|
||||
|
||||
RUN yarn install --frozen-lockfile --network-timeout 600000 \
|
||||
&& yarn cache clean
|
||||
|
||||
COPY . .
|
||||
|
||||
# Config comes from the environment in k8s; libflitter still expects the file
|
||||
# to exist, so ship an empty one. (.dockerignore keeps the real .env out.)
|
||||
RUN touch /app/.env
|
||||
|
||||
CMD ["node", "index.js"]
|
||||
|
||||
Reference in New Issue
Block a user