24
.github/workflows/deploy.yml
vendored
Normal file
24
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
name: Auto Deploy to Self-Hosted
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- prod
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: self-hosted
|
||||
|
||||
steps:
|
||||
- name: 🔄 Kodni olish
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 📥 Secret orqali .env fayl yaratish
|
||||
run: |
|
||||
echo "${{ secrets.BASE_ENV_FILE }}" > .env
|
||||
echo "${{ secrets.AUTH_ENV_FILE }}" > ./auth/.env
|
||||
|
||||
- name: 🛠 Docker Compose bilan build & deploy
|
||||
run: |
|
||||
docker compose down
|
||||
docker compose --profile auth --profile payment up -d --build
|
||||
@@ -15,7 +15,7 @@ services:
|
||||
- "--entrypoints.web.address=:80"
|
||||
- "--providers.docker.exposedbydefault=false"
|
||||
ports:
|
||||
- "80:80"
|
||||
- "${PORT-84}:80"
|
||||
- "8080:8080" # Dashboard uchun
|
||||
volumes:
|
||||
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||
|
||||
Reference in New Issue
Block a user