Skip to content

Commit

Permalink
Merge pull request #35 from ozaki-physics/feature/#33
Browse files Browse the repository at this point in the history
chore: GitHub Actions の修正
  • Loading branch information
ozaki-physics authored Feb 22, 2025
2 parents 877c04d + 8b1da51 commit 9268ea7
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 5 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/app-engine-sveltekit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ on:
# ブランチを選択するオプション
description: 'Branch to deploy'
required: true
# デフォルトは develop ブランチ
default: 'develop'

# デプロイ先が テスト環境 or 本番環境 で 異なるため
# Environment ごとに secret を設定(variables じゃない)
Expand Down Expand Up @@ -58,7 +56,7 @@ jobs:
- name: App Engine に Deploy する
id: deploy-to-app-engine
run: |-
gcloud app deploy ./frontend/local_test_svelte/app.yaml --format json --project ${{ secrets.GCP_PROJECT_ID }} --promote --quiet
gcloud app deploy ./frontend/raison-me-fe/app.yaml --format json --project ${{ secrets.GCP_PROJECT_ID }} --promote --quiet
# 必要に応じて、後続のステップで Cloud Run の URL 出力を使用
- name: App Engine の URL 出力
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/cloud-run-go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ on:
# ブランチを選択するオプション
description: 'Branch to deploy'
required: true
# デフォルトは develop ブランチ
default: 'develop'

# デプロイ先が テスト環境 or 本番環境 で 異なるため
# Environment ごとに secret を設定(variables じゃない)
Expand Down
3 changes: 3 additions & 0 deletions backend/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
app.yaml
cloud-run-service.template.yaml
Dockerfile
29 changes: 29 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# ビルドステージ
FROM golang:1.23 AS builder

# 作業ディレクトリの設定
WORKDIR /backend

# Goモジュールをキャッシュ
COPY go.mod .
COPY go.sum .
RUN go mod download

# アプリケーションのソースをコピー
COPY . .

# アプリケーションをビルド
RUN go build -o main main.go

# 実行ステージ
FROM debian:stable-slim

WORKDIR /app

# なぜか path を通さないとエラーになった
ENV PATH="/app:${PATH}"

# ビルド済みのバイナリをコピー
COPY --from=builder /backend/main /app/main

CMD ["./main"]

0 comments on commit 9268ea7

Please sign in to comment.