-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (24 loc) · 619 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
30
31
32
FROM node:lts-alpine3.19
# Set the working directory
WORKDIR /app
# Set environment variables
ARG Docker_PGDATABASE
ARG Docker_PGPASSWORD
ARG Docker_PGUSER
ARG Docker_PGHOST
# Set the environment variables
ENV Docker_PGDATABASE=$PGDATABASE
ENV Docker_PGPASSWORD=$PGPASSWORD
ENV Docker_PGUSER=$PGUSER
ENV Docker_PGHOST=$PGHOST
# Copy package.json and package-lock.json files
COPY package*.json ./
# Install npm dependencies
RUN npm install -g npm@latest
RUN npm install
# Copy the rest of the application code
COPY . .
# Expose port 8080
EXPOSE 8080
# Command to run the application
CMD ["npm", "run", "server"]