Skip to content

Commit 357f9d1

Browse files
committed
container
1 parent 2f39cd7 commit 357f9d1

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

Dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ WORKDIR /app
55
COPY ["package.json", "package-lock.json*", "./"]
66
RUN \
77
mkdir -p /app/node_modules/.vite && \
8-
npm install
8+
npm install && \
9+
npm run build
910
COPY . .
10-
CMD sh /app/start_container.sh
11+
CMD sh /app/start_container.sh

start_container.sh

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
#!/usr/bin/env sh
22
set -ex
3-
trap exit TERM
43

54
cd /app/
65

76
if [ "$DEPLOYMENT" = "development" ]; then
87
echo "DEVELOPMENT MODE"
98
npm run start
109
else
11-
chown -R node:node /app
1210
npm run build
13-
npm run serve -- --host
14-
fi
11+
npm run server:prod
12+
fi

0 commit comments

Comments
 (0)