-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (28 loc) · 854 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
33
34
35
36
37
38
# Use an official Node.js runtime as a parent image
FROM node:20
# Set the working directory in the container to /app
WORKDIR /app
# Copy the frontend and backend directories to the Docker image
COPY Frontend ./Frontend
COPY Backend ./Backend
# Install the frontend dependencies and build the frontend
WORKDIR /app/Frontend
COPY Frontend/package*.json ./
RUN npm install
RUN npm run build
# Install the backend dependencies
WORKDIR /app/Backend
COPY Backend/package*.json ./
RUN npm install
# Go back to the /app directory
WORKDIR /app
# Copy the start script into the Docker image
COPY package*.json ./
COPY start.sh ./start.sh
RUN chmod +x ./start.sh
# Install the root dependencies
RUN npm install
# Make port 80 available to the world outside this container
EXPOSE 80
# Run the start script when the container launches
CMD [ "./start.sh" ]