Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

when my pipeline push my projects files on server my poject file present in sever gets overwrite er

Siddhant Pandey September 20, 2023

i am stuck on a step it is after my pipeline runs successful my whole project gets overwrite by new push done by my pipeline i am not able to run it automatically with my pm2 reload command whenever changes are done i just have to setup my python fastapi project manually can some one help me. how can i run my pyhton fastapi project with the help of my pipeline without dong it manually everytime.

 

4.png3.png2.png1.png

 

 

suggest me changes need to required.

1 answer

1 accepted

1 vote
Answer accepted
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 21, 2023

G'day @Siddhant Pandey 

rsync will sync files and directories between two hosts or machines. So, if you use rsync to deploy to your server, it will sync everything in bitbucket over to your server.

So, if you don't want your server files to be overwritten by rsync, my suggestion is to check the following guide:

Rsync --exclude 

Use these options to exclude specific files or directories from being overwritten when you sync from Bitbucket to your server. Example usage in Rsync pipe:

script:
  - pipe: atlassian/rsync-deploy:0.10.0
    variables:
      USER: 'ec2-user'
      SERVER: '127.0.0.1'
      REMOTE_PATH: '/var/www/build/'
      LOCAL_PATH: 'build'
      DEBUG: 'true'
      EXTRA_ARGS: '--exclude=*.txt'

This pipe will exclude all *.txt files in your server from being overwritten.

Regards,
Syahrul

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events