forked from sfbrigade/bats-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
22 lines (16 loc) · 790 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM node:16.13.1
# Set an env variable for the location of the app files
ENV APP_HOME=/opt/node/app
# Install helper utilities for gcloud deployment management
RUN wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | apt-key add - && \
echo "deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main" >> /etc/apt/sources.list.d/pgdg.list && \
apt-get update -y && \
apt-get install -y postgresql-client-12
# update path to include any installed node module executables
RUN echo "export PATH=$APP_HOME/node_modules/.bin:\$PATH\n" >> /root/.bashrc
# Create a directory for the server app to run from
RUN mkdir -p $APP_HOME
# Add the project files into the app directory and set as working directory
ADD . $APP_HOME
WORKDIR $APP_HOME
RUN yarn && yarn build