docker
This commit is contained in:
39
.gitea/workflows/deploy-frontend.yml
Normal file
39
.gitea/workflows/deploy-frontend.yml
Normal file
@@ -0,0 +1,39 @@
|
||||
name: Deploy Frontend
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- '.gitea/workflows/deploy-frontend.yml'
|
||||
- 'frontend/**'
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build image
|
||||
run: |
|
||||
docker build \
|
||||
--build-arg API_BASE=${{ vars.API_BASE_URL }} \
|
||||
-t tmc-frontend ./frontend
|
||||
|
||||
- name: Stop old container
|
||||
run: docker rm -f tmc-frontend || true
|
||||
|
||||
- name: Run
|
||||
run: |
|
||||
docker run -d \
|
||||
--name tmc-frontend \
|
||||
--network traefik \
|
||||
--label "traefik.enable=true" \
|
||||
--label "traefik.http.routers.tmc-frontend.rule=Host(\`${{ vars.FRONTEND_HOST }}\`)" \
|
||||
--label "traefik.http.routers.tmc-frontend.entrypoints=websecure" \
|
||||
--label "traefik.http.routers.tmc-frontend.tls=true" \
|
||||
--label "traefik.http.routers.tmc-frontend.tls.certresolver=myresolver" \
|
||||
--label "traefik.http.services.tmc-frontend.loadbalancer.server.port=80" \
|
||||
tmc-frontend:latest
|
||||
Reference in New Issue
Block a user