Skip to content
This repository has been archived by the owner on Jan 7, 2025. It is now read-only.

Commit

Permalink
Merge pull request #17 from ZDK-UTsukuba/develop
Browse files Browse the repository at this point in the history
Deploy
  • Loading branch information
Lailai0477 authored Mar 27, 2024
2 parents 42238ed + 0c66579 commit 3594e1e
Show file tree
Hide file tree
Showing 11 changed files with 1,167 additions and 48 deletions.
13 changes: 13 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
}
}
23 changes: 23 additions & 0 deletions .github/workflows/deploy-cf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Deploy Coudflare

on:
push:
branches:
- master

jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
secrets: |
ESA_TOKEN
env:
ESA_TOKEN: ${{ secrets.ESA_TOKEN }}
30 changes: 30 additions & 0 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: reviewdog

on: [pull_request]

jobs:
actionlint:
name: ActionLint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Lint Actions
uses: reviewdog/action-actionlint@v1
with:
fail_on_error: true

eslint:
name: ESLint
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: ESLint
uses: reviewdog/action-eslint@v1
with:
eslint_flags: "src/"
fail_on_error: true
13 changes: 13 additions & 0 deletions Dockerfile.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:hydrogen-bookworm

WORKDIR /app

## Install node_modules
COPY package*.json .
RUN npm install

COPY . .

EXPOSE 8787

CMD [ "npm", "run", "dev" ]
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
# hello2024-backend
新入生情報Web2024バックエンド

## 環境構築

1. `cp sample.dev.vars .dev.vars`
2. `node_modules` のインストール
- 直接実行: `npm install`
- docker compose: `docker compose run --rm app npm install`

## docker compose

- バックグラウンド実行
- 起動: `docker compose up -d`
- 停止: `docker compose stop`
- フォアグラウンド実行: `docker compose up`

## API

### GET `/posts`
Expand Down
12 changes: 12 additions & 0 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3.4'

services:
app:
build:
context: .
dockerfile: Dockerfile.local
working_dir: /app
ports:
- 127.0.0.1:8787:8787
volumes:
- .:/app:cached
Loading

0 comments on commit 3594e1e

Please sign in to comment.