From 07094fc5b755630d8523e594504a7905a75c8bcf Mon Sep 17 00:00:00 2001 From: A'zamov Samandar Date: Sat, 19 Apr 2025 15:37:38 +0500 Subject: [PATCH 1/4] "Avtomatik deploy skriptini qo'shish" --- .github/workflows/deploy.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..751c8a0 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -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@v3 + + - 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 up -d --build \ No newline at end of file From 8bc491e0a5ee97b8b225449d6084d725b9a94489 Mon Sep 17 00:00:00 2001 From: A'zamov Samandar Date: Sat, 19 Apr 2025 15:39:34 +0500 Subject: [PATCH 2/4] fix: actions/checkout versiyasini v4 ga yangilash --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 751c8a0..9229197 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,7 +11,7 @@ jobs: steps: - name: 🔄 Kodni olish - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 📥 Secret orqali .env fayl yaratish run: | From d9c3ba33576e4a8bd3fc4c3445748b1ff23560af Mon Sep 17 00:00:00 2001 From: A'zamov Samandar Date: Sat, 19 Apr 2025 15:45:21 +0500 Subject: [PATCH 3/4] docker-compose.yml da port o'zgaruvchisi qo'shildi. --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index a771789..3c9c52a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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" From ee11e4d857a8b14ce8a70fd54d54c07a1a2233d3 Mon Sep 17 00:00:00 2001 From: A'zamov Samandar Date: Sat, 19 Apr 2025 15:49:11 +0500 Subject: [PATCH 4/4] Git commit xabari: `docker compose profillarini qo'shdi` --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9229197..db808fa 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,4 +21,4 @@ jobs: - name: 🛠 Docker Compose bilan build & deploy run: | docker compose down - docker compose up -d --build \ No newline at end of file + docker compose --profile auth --profile payment up -d --build \ No newline at end of file