Skip to content

fix: using correct Dockerfile for staging #79

fix: using correct Dockerfile for staging

fix: using correct Dockerfile for staging #79

name: DockerProd Deploy
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: "self-hosted"
environment:
name: staging
env:
API_PORT: ${{ secrets.API_PORT }}
JWT_SECRETKEY: ${{ secrets.JWT_SECRETKEY }}
MINIO_ACCESS_KEY: ${{ secrets.MINIO_ACCESS_KEY }}
MINIO_PORT: ${{ secrets.MINIO_PORT }}
MINIO_CONSOLE_PORT: ${{ secrets.MINIO_CONSOLE_PORT }}
MINIO_ROOT_PASSWORD: ${{ secrets.MINIO_ROOT_PASSWORD }}
MINIO_ROOT_USER: ${{ secrets.MINIO_ROOT_USER }}
MINIO_SECRET_KEY: ${{ secrets.MINIO_SECRET_KEY }}
MYSQL_PORT: ${{ secrets.MYSQL_PORT }}
MYSQL_ROOT_PASSWORD: ${{ secrets.MYSQL_ROOT_PASSWORD }}
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Deploy via Docker
run: |
docker compose -f docker-compose-staging.yml down
docker compose -f docker-compose-staging.yml rm -f
docker compose -f docker-compose-staging.yml up --build -d