-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from su-its/feat/backend/api/seed
Feat/backend/api/seed
- Loading branch information
Showing
21 changed files
with
412 additions
and
1,328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# 開発環境構築 | ||
|
||
## 1. リポジトリのクローン | ||
|
||
```bash | ||
$ git clone https://github.com/su-its/typing.git | ||
$ cd typing/typing-app | ||
``` | ||
|
||
## 2. パッケージのインストール(npm ではなく bun を採用しています) | ||
|
||
### Bun をインストールする (まだインストールしていない場合) | ||
|
||
```bash | ||
$ curl -fsSL https://bun.sh/install | bash | ||
``` | ||
|
||
### プロジェクトの依存パッケージをインストール(typing-app ディレクトリで実行) | ||
|
||
```bash | ||
$ bun install | ||
``` | ||
|
||
## 3. API & DB の起動(typing-server ディレクトリで実行) | ||
|
||
```bash | ||
$ docker-compose --file docker-compose.dev.yml up --build | ||
``` | ||
|
||
## 4. フロントエンドの起動(typing-app ディレクトリで実行) | ||
|
||
```bash | ||
$ bun dev | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# 基本イメージ | ||
FROM golang:1.22.0 as builder | ||
|
||
# 作業ディレクトリを設定 | ||
WORKDIR /app | ||
|
||
# ソースコードをコピー | ||
COPY . . | ||
|
||
# 依存関係をインストール | ||
RUN go mod download | ||
|
||
# アプリケーションをビルド | ||
RUN CGO_ENABLED=0 GOOS=linux go build -v -o server ./api/cmd/main.go | ||
|
||
# 実行イメージ | ||
FROM alpine:latest | ||
RUN apk --no-cache add ca-certificates | ||
|
||
# tzdataパッケージのインストール | ||
RUN apk --no-cache add tzdata | ||
|
||
WORKDIR /root | ||
|
||
# ビルドしたバイナリをコピー | ||
COPY --from=builder /app/server . | ||
|
||
# アプリケーションの実行 | ||
CMD ["./server","-seed","true"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.