CI/CD: Refatorado Passo a passo para Deploy
All checks were successful
Deploy WiFi-ETL Prod / deploy (push) Successful in 45s
All checks were successful
Deploy WiFi-ETL Prod / deploy (push) Successful in 45s
This commit is contained in:
parent
345503cf20
commit
8788db407d
@ -12,8 +12,12 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Clone/Update código
|
- name: Clone/Update código
|
||||||
run: |
|
run: |
|
||||||
|
set -e
|
||||||
if [ -d /opt/wifi-etl/.git ]; then
|
if [ -d /opt/wifi-etl/.git ]; then
|
||||||
cd /opt/wifi-etl && git pull origin main
|
cd /opt/wifi-etl
|
||||||
|
git fetch origin
|
||||||
|
git reset --hard origin/main
|
||||||
|
git clean -fd
|
||||||
else
|
else
|
||||||
git clone http://10.0.120.75:3030/SEU_USUARIO/wifi-etl.git /opt/wifi-etl
|
git clone http://10.0.120.75:3030/SEU_USUARIO/wifi-etl.git /opt/wifi-etl
|
||||||
fi
|
fi
|
||||||
@ -26,8 +30,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Build e deploy container
|
- name: Build e deploy container
|
||||||
run: |
|
run: |
|
||||||
|
set -e
|
||||||
cd /opt/wifi-etl
|
cd /opt/wifi-etl
|
||||||
docker-compose -f infra/docker-compose.prod.yml up -d --build
|
docker-compose -f infra/docker-compose.prod.yml down
|
||||||
|
docker-compose -f infra/docker-compose.prod.yml build --no-cache
|
||||||
|
docker-compose -f infra/docker-compose.prod.yml up -d
|
||||||
echo "✓ Container iniciado"
|
echo "✓ Container iniciado"
|
||||||
|
|
||||||
- name: Aguardar inicialização
|
- name: Aguardar inicialização
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user