Skip to content

Commit 6b778ff

Browse files
authored
Merge pull request #426 from DefangLabs/kevin/reverted
2 parents a8af161 + 79b904e commit 6b778ff

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

app/Dockerfile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Start from the official Node.js LTS image
2+
FROM node:20-alpine
3+
4+
# Set the working directory
5+
WORKDIR /app
6+
7+
# Copy package.json and package-lock.json
8+
COPY package*.json ./
9+
10+
# Install dependencies
11+
RUN npm install
12+
13+
# Copy the rest of your app's source code
14+
COPY . .
15+
16+
# Build the Next.js app
17+
ARG NEXT_OUTPUT
18+
RUN npm run build
19+
20+
# If we're doing an export, copy all files from the out directory to /static
21+
# This is a workaround for Next.JS issue https://github.com/vercel/next.js/issues/59988
22+
RUN if [ "$NEXT_OUTPUT" = "export" ]; then \
23+
cp -R out/* /static/; \
24+
fi
25+
26+
# Expose the port that your app runs on
27+
EXPOSE 3000
28+
29+
# Start the app
30+
CMD ["npm", "start"]

compose.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ services:
44
# domainname: www.example.xyz # uncomment if you want to use your own domain
55
build:
66
context: ./app
7+
dockerfile: Dockerfile
78

89
ports:
910
- target: 3000

0 commit comments

Comments
 (0)