Between us I'm hoping we can come up with a best practise for deploying October as I've recently had a complete nightmare just deploying to a staging server - components not loading, component default partials loading instead of ones in theme, general errors, paths not working. The only way I've been able to successfully deploy is as below but I think this is ridiculous.
- Install October on staging server using composer
- Manually copying across plugins and custom theme
- Updating required bits in app/config (key, theme, url,
db details-- see below) - Running php artisan october:up
Update app/config/database.php to use getenv() variables (can't do this in step 3 as artisan doesn't recognise them)-- see below
What I'd quite like to be able to do, and maybe ignorantly doesn't understand why it can be done, is just pull from my repo but this is full of problems which it seems separately installing October fixes.
I'm not brilliant with git so is there a better way to version control what I'm doing? Should I just be included my plugins/themes directory? I don't like this idea as ideally I want to be running the same core code across servers. Maybe I'm not ignoring everything I should be (basically the app/storage directory and app/config/database.php). I also want to be able to make use of the deploy option in Forge and not have to spend too much time working out how to get a deployed version of October to work.
I'm open to ideas and willing to try things if people have suggestions. Has anyone successfully deployed from their own repo? Seems to me it should work with little updates.
Also anyone know why artisan can't find environment variables? That would at least cross off step 5.
Answer: Worked it out environment variables - Forge installs .env.php file in root, not in public directory so it has to be moved into public for artisan to see it.
Cheers,
Adam
Last updated