Compare commits
6 Commits
production
...
8e218be1ce
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e218be1ce | ||
|
|
a3269b45c3 | ||
|
|
e558fcde56 | ||
|
|
60a11f89ff | ||
|
|
59ceb7a51f | ||
|
|
b61c6d4abc |
43
.drone.yml
43
.drone.yml
@@ -1,6 +1,11 @@
|
|||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: homolog
|
name: deploy
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
- production
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: deploy to homolog
|
- name: deploy to homolog
|
||||||
@@ -13,8 +18,10 @@ steps:
|
|||||||
source: .
|
source: .
|
||||||
target: /home/app_fatura_homolog
|
target: /home/app_fatura_homolog
|
||||||
rm: true
|
rm: true
|
||||||
|
when:
|
||||||
|
branch: main
|
||||||
|
|
||||||
- name: restart container
|
- name: restart homolog container
|
||||||
image: appleboy/drone-ssh
|
image: appleboy/drone-ssh
|
||||||
settings:
|
settings:
|
||||||
host: 216.22.5.141
|
host: 216.22.5.141
|
||||||
@@ -23,5 +30,35 @@ steps:
|
|||||||
port: 22
|
port: 22
|
||||||
script:
|
script:
|
||||||
- cd /home/app_fatura_homolog
|
- cd /home/app_fatura_homolog
|
||||||
- docker compose down
|
- docker compose down --remove-orphans
|
||||||
- docker compose up -d
|
- docker compose up -d
|
||||||
|
when:
|
||||||
|
branch: main
|
||||||
|
|
||||||
|
- name: deploy to production
|
||||||
|
image: appleboy/drone-scp
|
||||||
|
settings:
|
||||||
|
host: 216.22.5.141
|
||||||
|
username: root
|
||||||
|
password: F6tC5tCh29XQRpzp
|
||||||
|
port: 22
|
||||||
|
source: .
|
||||||
|
target: /home/app_fatura
|
||||||
|
rm: true
|
||||||
|
when:
|
||||||
|
branch: production
|
||||||
|
|
||||||
|
- name: restart production container
|
||||||
|
image: appleboy/drone-ssh
|
||||||
|
settings:
|
||||||
|
host: 216.22.5.141
|
||||||
|
username: root
|
||||||
|
password: F6tC5tCh29XQRpzp
|
||||||
|
port: 22
|
||||||
|
script:
|
||||||
|
- cd /home/app_fatura
|
||||||
|
- docker compose down --remove-orphans
|
||||||
|
- docker compose up -d
|
||||||
|
when:
|
||||||
|
branch: production
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user