From 6bcf27477505fb11af746074215d784432995346 Mon Sep 17 00:00:00 2001 From: na-trium-144 <100704180+na-trium-144@users.noreply.github.com> Date: Sat, 16 Nov 2024 20:19:02 +0900 Subject: [PATCH] =?UTF-8?q?docker=E3=81=A8prisma=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dockerignore | 5 --- .github/workflows/build-docker.yml | 40 ---------------------- Dockerfile | 13 ------- README.md | 4 --- prisma/schema.prisma | 54 ------------------------------ 5 files changed, 116 deletions(-) delete mode 100644 .dockerignore delete mode 100644 .github/workflows/build-docker.yml delete mode 100644 Dockerfile delete mode 100644 prisma/schema.prisma diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 138f86e..0000000 --- a/.dockerignore +++ /dev/null @@ -1,5 +0,0 @@ -.github/ -.next/ -.env -node_modules/ -data/ diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml deleted file mode 100644 index 77d537d..0000000 --- a/.github/workflows/build-docker.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Build docker image - -on: - push: - branches: ["main"] - -jobs: - build: - runs-on: ubuntu-22.04 - name: Build - steps: - - uses: actions/checkout@v4 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - # - name: Login to Docker Hub - # uses: docker/login-action@v3 - # with: - # username: ${{ vars.DOCKERHUB_USERNAME }} - # password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v6 - with: - context: . - platforms: linux/amd64,linux/arm64 - push: true - tags: | - ghcr.io/na-trium-144/falling-nikochan/falling-nikochan:latest diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 2f03be9..0000000 --- a/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -FROM ubuntu:22.04 -ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get upgrade -y && \ - apt-get install -y curl git && \ - curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ - apt-get install -y nodejs && \ - apt-get clean -COPY . /root/nikochan -WORKDIR /root/nikochan -RUN npm ci -f && \ - npm run build && \ - npm cache clean --force -CMD ["npm", "run", "start"] diff --git a/README.md b/README.md index fae8b86..79c6b6e 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,3 @@ npm run dev ```sh npm run start ``` -* Dockerを使うこともできます。Dockerfile をビルドするか、ビルド済みのもの(amd64, arm64)が `ghcr.io/na-trium-144/falling-nikochan/falling-nikochan:latest` としてpullできます - * 別途postgresqlとseaweedfsを起動してください - * .env ファイルは /root/nikochan/.env としてマウントしてください - * ポート3000で起動します diff --git a/prisma/schema.prisma b/prisma/schema.prisma deleted file mode 100644 index 1596bd4..0000000 --- a/prisma/schema.prisma +++ /dev/null @@ -1,54 +0,0 @@ -// This is your Prisma schema file, -// learn more about it in the docs: https://pris.ly/d/prisma-schema - -// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions? -// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init - -generator client { - provider = "prisma-client-js" -} - -datasource db { - provider = "postgresql" - url = env("DATABASE_URL") -} - -model ChartFile { - fid String @id - cid String @unique - ytId String - title String - composer String - chartCreator String - levels LevelBrief[] - updatedAt DateTime - playCount PlayCount? -} - -model PlayCount { - cid String @id - chart ChartFile @relation(fields: [cid], references: [cid]) - count Int -} - -model LevelBrief { - id Int @id @default(autoincrement()) - chart ChartFile @relation(fields: [cid], references: [cid]) - cid String - lvIndex Int - @@unique([cid, lvIndex]) - name String - hash String - type String - difficulty Int - noteCount Int - bpmMin Float - bpmMax Float - length Float - unlisted Boolean @default(false) -} - -model CreateRateLimit { - ip String @id - lastCreate DateTime @updatedAt -}