Support Docker
This commit is contained in:
1
.dockerignore
Normal file
1
.dockerignore
Normal file
@@ -0,0 +1 @@
|
|||||||
|
node_modules
|
||||||
10
Dockerfile
Normal file
10
Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
FROM node:20
|
||||||
|
WORKDIR /app
|
||||||
|
COPY . .
|
||||||
|
RUN corepack enable && \
|
||||||
|
corepack install --global pnpm@latest
|
||||||
|
RUN pnpm install --frozen-lockfile
|
||||||
|
RUN pnpm build
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
EXPOSE 6001
|
||||||
|
CMD ["pnpm", "runserver"]
|
||||||
12
docker-compose.yml
Normal file
12
docker-compose.yml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
services:
|
||||||
|
risuai:
|
||||||
|
container_name: risuai
|
||||||
|
build: .
|
||||||
|
restart: always
|
||||||
|
expose:
|
||||||
|
- 6001
|
||||||
|
volumes:
|
||||||
|
- risuai-save:/app/save
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
risuai-save:
|
||||||
Reference in New Issue
Block a user