Add Docker support: Dockerfile, docker-compose, GitHub Actions

This commit is contained in:
2026-04-27 10:41:48 +08:00
parent 2caef17124
commit 945df849f8
5 changed files with 14 additions and 76 deletions
+5 -14
View File
@@ -1,4 +1,4 @@
name: Build and Push Docker Images
name: Build and Push Docker Image
on:
push:
@@ -40,22 +40,13 @@ jobs:
type=sha,prefix=
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push backend image
- name: Build and push image
uses: docker/build-push-action@v5
with:
context: ./backend
context: .
file: ./backend/Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-backend:${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push frontend image
uses: docker/build-push-action@v5
with:
context: ./frontend
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-frontend:${{ steps.meta.outputs.tags }}
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max