This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

RichLove
RichLove

Hi

I'm having a bit of trouble with deployment of local code to production server, more specifically what to include in .gitignore. I read a post saying the standard .gitignore for October should be fine but it does not ignore the Storage folder or any of the subdirectories, which are causing issues (as they change on production with website use). I can see that some folders in Storage may be needed in version control but surely things like the following shouldn't be:

Storage/cms/cache

Storage/combiner/assets

Storage/cms/twig

Storage/framework/cache

Storage/framework/sessions

These are the directories that seem to get updated through site use (as opposed to development changes)

Any advice would be appreciated. Thanks Rich

Last updated

chris10207
chris10207

i proceed the other way around actually, i ignore everything first, then i add my theme folder only for example

# exclude everything except directory themes/mythemename
/*
!/themes
/themes/*
!/themes/mythemename
jamesfawcett
jamesfawcett

Mines deploying quite well with just the following, then i manually upload the assets from within the storage folder by FTP to save git space:

#octoberCMS 
*/storage/
*/vendor/
*/install_files/
*/bower_components/

Last updated

WaskiWabit
WaskiWabit

jamesfawcett said:

Mines deploying quite well with just the following, then i manually upload the assets from within the storage folder by FTP to save git space:

#octoberCMS 
*/storage/
*/vendor/
*/install_files/
*/bower_components/

Personally /install_files/ would already be deleted. .

Last updated

Mohsin
Mohsin

I would go with what @chris10207 suggested, which is too exclude all the OctoberCMS files entirely. Do you want to track changes to the OctoberCMS codebase to be part of your application's codebase? Wouldn't it make better sense to simply track the changes specific to your application and plugins? So this is the ignore that I use.

Make sure to use the composer composer create-project october/october Acme and also create a README.md that mentions how to install October so that your end-users know what to do to bring the codebase back in.

Meysam
Meysam

@mohsin Why are you ignoring all your themes and plugins? If you don't track them, what do you track?

1-6 of 6

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.