You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, please forgive my ignorant if what I wrote here is already supported natively without a little hack.
Here's the situation, I need to deploy my symfony app to both production and staging with a few command differences between them.
At first, I wrote two config files: deploy-prod.php and deploy-staging.php and removed deploy.php for clarity with intent of executing it via: bin/dep deploy staging -f deploy-staging.php. However, I found out that the deployer command required the deploy.php file. So, I need to figure out how to put 2 configs inside that file. I came up with the following gist:
to force the env to staging, when deploying to staging server. That code is commented when deploying to production. However, to my surprise, code in that gist doesn't execute the build task. Therefore, it defeated the purpose.
To make the deployer work, I had to hack it, thus, the following gist are born:
This gist work flawlessly when I executed: bin/dep deploy staging -vvv.
Please review if what I created here is actually already exists within the deployer. Because, I can't find what I needed in the documentation on deployer.org.
The text was updated successfully, but these errors were encountered:
So, please forgive my ignorant if what I wrote here is already supported natively without a little hack.
Here's the situation, I need to deploy my symfony app to both production and staging with a few command differences between them.
At first, I wrote two config files:
deploy-prod.php
anddeploy-staging.php
and removeddeploy.php
for clarity with intent of executing it via:bin/dep deploy staging -f deploy-staging.php
. However, I found out that the deployer command required thedeploy.php
file. So, I need to figure out how to put 2 configs inside that file. I came up with the following gist:https://gist.github.com/ariefbayu/fb9e564a23c60f6d3582166922b4dbbf
Note that I had to put:
to force the env to staging, when deploying to staging server. That code is commented when deploying to production. However, to my surprise, code in that gist doesn't execute the
build
task. Therefore, it defeated the purpose.To make the deployer work, I had to hack it, thus, the following gist are born:
https://gist.github.com/ariefbayu/66e2158498e052a6f85fcdb0183c03a2
This gist work flawlessly when I executed:
bin/dep deploy staging -vvv
.Please review if what I created here is actually already exists within the deployer. Because, I can't find what I needed in the documentation on deployer.org.
The text was updated successfully, but these errors were encountered: