mirror of
https://github.com/ztjhz/BetterChatGPT.git
synced 2023-07-20 23:11:29 +03:00
Add Dockerfile
This commit is contained in:
2
.dockerignore
Normal file
2
.dockerignore
Normal file
@@ -0,0 +1,2 @@
|
||||
/.github
|
||||
/Dockerfile
|
||||
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
FROM node:alpine
|
||||
|
||||
RUN addgroup -S appgroup && \
|
||||
adduser -S appuser -G appgroup && \
|
||||
mkdir -p /home/appuser/app && \
|
||||
chown appuser:appgroup /home/appuser/app
|
||||
USER appuser
|
||||
|
||||
RUN yarn config set prefix ~/.yarn && \
|
||||
yarn global add serve
|
||||
|
||||
WORKDIR /home/appuser/app
|
||||
COPY --chown=appuser:appgroup package.json yarn.lock ./
|
||||
RUN yarn install --frozen-lockfile
|
||||
COPY --chown=appuser:appgroup . .
|
||||
|
||||
RUN yarn build
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["/home/appuser/.yarn/bin/serve", "-s", "dist", "-l", "3000"]
|
||||
Reference in New Issue
Block a user