feat: sync property images to server via scp, mount as bind volume in frontend service
This commit is contained in:
parent
1d2b849bda
commit
00620a0a70
2 changed files with 14 additions and 0 deletions
|
|
@ -96,6 +96,15 @@ jobs:
|
|||
docker-compose.prod.yml \
|
||||
${{ vars.SSH_USER }}@${{ vars.SSH_HOST }}:/opt/saas-imobiliaria/docker-compose.prod.yml
|
||||
|
||||
- name: Sync property images to server
|
||||
run: |
|
||||
ssh -i ~/.ssh/deploy_key -p ${{ vars.SSH_PORT }} \
|
||||
${{ vars.SSH_USER }}@${{ vars.SSH_HOST }} \
|
||||
"mkdir -p /opt/saas-imobiliaria/public/imoveis"
|
||||
scp -i ~/.ssh/deploy_key -P ${{ vars.SSH_PORT }} -r \
|
||||
frontend/public/imoveis \
|
||||
${{ vars.SSH_USER }}@${{ vars.SSH_HOST }}:/opt/saas-imobiliaria/public/
|
||||
|
||||
- name: Deploy Swarm stack on server
|
||||
env:
|
||||
IMAGE_TAG: ${{ needs.build.outputs.image_tag }}
|
||||
|
|
|
|||
|
|
@ -61,6 +61,11 @@ services:
|
|||
condition: any
|
||||
delay: 5s
|
||||
max_attempts: 5
|
||||
mounts:
|
||||
- type: bind
|
||||
source: /opt/saas-imobiliaria/public/imoveis
|
||||
target: /usr/share/nginx/html/imoveis
|
||||
read_only: true
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=proxy"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue