5
Hello,
I use it to upload my files from the GIT site, deploying to my server automatically so I did the following:
1 - I created a GIT repository on my server outside the public_html folder 2 - then I created a post-receive file inside the Hooks directory of my repository, where it deploys to my server, with the following line
GIT_WORK_TREE=/home/diretorio/public_html git checkout -f
But I have some problems and I don’t know how to solve, it’s them:
Image files
- I have a directory of users' images in Assets/img/users/, the problem is that every time I pull to my repository on my server this directory is "zeroed" since the files on the server are not on my machine
Question:
- how to make this directory not be updated in deploy? I tried using . gitignore but it didn’t work
Certain directories cannot be on the deploy
- At my workplace I have a GIT server too, where we do all the PULL of our applications for other developers to work on, so all of our projects have all the files we work with, including the database diagram file
- This diagram file is in the /sql/diagram-name folder that is within my project structure
- When I pull to our internal GIT server this folder has to be sent normally because it’s a working file that another developer can use, but when I pull to the production server, that automatically deploys this folder cannot be sent to DEPLOY
Question
- How can I make the /sql folder when performing PULL for the production server not included in the DEPLOY action and then copied to the web server?
- I’ve tried using the GIT --exclude=/home/directory/folder command but it doesn’t work
Who can help me and give me a light would appreciate
Thank you
Hello Gomes, first thank you for the reply, today I am using Codeigniter for development, all my platform is developed with this framework and Mysql database. Today I do not have this deployment process that quotes to mimic the files, replace variables, etc we do it by hand when uploading the files to the server, Being quite honest, I’m not sure how to set up this flow in a correct way and that can be easily replicated for the team and for new projects, could you give me some tips or indicate some ways to do this. Thank you
– Jorge Ribeiro Junior
Gomes, I did some research on GULP, I found it very interesting, I’m already studying and did some tests, but it still doesn’t solve my deployment problem without doing FTP. I used the Gulp-deploy-git plugin compiling all the files to a folder and deploying it on the server but it didn’t work properly, you would have more or less a hint of how to maintain a more favorable environment, I think we’re kind of lost
– Jorge Ribeiro Junior