chore:Dockerfile and yaml
This commit is contained in:
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
# 使用官方 Deno 镜像
|
||||
FROM denoland/deno:latest
|
||||
|
||||
# 设置镜像名称
|
||||
LABEL image.name="lingchair"
|
||||
|
||||
# 设置工作目录
|
||||
WORKDIR /app
|
||||
|
||||
# 复制源代码
|
||||
COPY --exclude=.git --exclude=.gitignore --exclude=Dockerfile --exclude=readme.md --exclude=thewhitesilk_config.json --exclude=thewhitesilk_data . .
|
||||
|
||||
# 缓存依赖并构建项目
|
||||
RUN deno task build
|
||||
|
||||
# 暴露应用端口(根据你的应用调整端口号)
|
||||
EXPOSE 3601
|
||||
|
||||
# 启动服务
|
||||
CMD ["deno", "task", "server"]
|
||||
15
docker-compose.yml
Normal file
15
docker-compose.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
version: '3'
|
||||
services:
|
||||
lingchair:
|
||||
container_name: lingchair
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
ports:
|
||||
- "3601:3601"
|
||||
restart: always
|
||||
volumes:
|
||||
- ./thewhitesilk_config.json:/app/thewhitesilk_config.json
|
||||
- ./thewhitesilk_data:/app/thewhitesilk_data
|
||||
Reference in New Issue
Block a user