Support Docker

This commit is contained in:
Naki
2024-10-13 01:29:12 +09:00
parent 1762e025bd
commit ac370a8718
3 changed files with 23 additions and 0 deletions

1
.dockerignore Normal file
View File

@@ -0,0 +1 @@
node_modules

10
Dockerfile Normal file
View 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
View File

@@ -0,0 +1,12 @@
services:
risuai:
container_name: risuai
build: .
restart: always
expose:
- 6001
volumes:
- risuai-save:/app/save
volumes:
risuai-save: