From 3c7cf4ec1675ab61f8f9a5bbd6cf967637fcabbb Mon Sep 17 00:00:00 2001 From: steve02081504 Date: Fri, 3 Jan 2025 01:33:38 +0800 Subject: [PATCH] fixes --- .github/workflows/github-build-push.yml | 8 ++++++-- docker-compose.yml | 4 +++- dockerfile | 3 --- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/github-build-push.yml b/.github/workflows/github-build-push.yml index 18a9dfe..c05b0dd 100644 --- a/.github/workflows/github-build-push.yml +++ b/.github/workflows/github-build-push.yml @@ -1,8 +1,12 @@ name: Build and Push Container +permissions: + contents: read + packages: write + on: push: - workflow_dispatch: + workflow_dispatch: jobs: build-and-push: runs-on: [ubuntu-latest] @@ -49,4 +53,4 @@ jobs: push: true tags: | ghcr.io/steve02081504/fount:latest - ghcr.io/steve02081504/fount:${{ github.sha }} \ No newline at end of file + ghcr.io/steve02081504/fount:${{ github.sha }} diff --git a/docker-compose.yml b/docker-compose.yml index 1768247..5a60f3b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,9 +2,11 @@ version: "3" services: fount: + container_name: fount image: steve02081504/fount:latest ports: - "8931:8931" volumes: - - ./data:/app/data:rw + - ./data:/app/data:rw # 挂载 data 目录以存储用户数据 + - ./node_modules:/app/node_modules:rw # 挂载 node_modules 目录以缓存用户数据产生的依赖项 restart: unless-stopped diff --git a/dockerfile b/dockerfile index f03b2d0..88b3560 100644 --- a/dockerfile +++ b/dockerfile @@ -9,9 +9,6 @@ EXPOSE 8931 # 给予 *.sh 执行权限 RUN chmod +x /app/*.sh -# 安装依赖 -RUN deno install --allow-scripts --allow-all --node-modules-dir=auto --entrypoint "/app/src/server/index.mjs" - # 使用 run.sh 作为启动脚本,并且传递参数 ENTRYPOINT ["/app/run.sh"] CMD []