Comments (24)
could you please provide config.php and deploy.php without sensitive data? Because the ENV_* will be set by what is defined in the deploy.php trough ->stage('prod')
from luya-deployer.
I'm thinking the problem lies with the values I've used in "set('repository'"
I commented out the "set(repository" line in deploy.php because I didn't 'have' a repository. But when I did I got the following error:-
Object repository
does not exist in Collection.
So I left it in and entered my own git login details and blundered my way through the following errors:-
remote: Invalid username or password.
fatal: Authentication failed for 'https://USER:[email protected]/VENDOR/REPO.git/'
remote: Repository not found.
fatal: repository 'https://{MYUSERNAME:MYPASSWORD}@github.com/VENDOR/REPO.git/' not found
Finally ended up with the following as the 'set repository' string
set('repository', 'https://{MYUSERNAME:MYPASSWORD}@github.com/luyadev/luya-kickstarter.git');
So I guess what's happening here is that it's pulling an instance of luya-kickstarter from that repository and that is overwriting my config.php file?
The documentation for deployer makes no mention of the values to enter in the 'set repository' string.
from luya-deployer.
the concept of deployer is to deploy a git repository, so you have to provide a repository to deploy :-)
from luya-deployer.
Hehe Shame we can't just 'deploy' our local instance to env_prod .... you're 'making' me have to use Best Practices here Basil lol
from luya-deployer.
Now I'll go learn how to create... push... commit to git
from luya-deployer.
😄 it's really easy, you will see. You can create private repos for free on git and there are thounds of tutorials and videos. hope you achieved what you want. 👍 going to close the issue.
from luya-deployer.
Hi Basil... I still think this is an issue.. as in:-
I don't think production information should be kept on github to get this to work...
It should be reading from the deploy.php held locally to make the database connection.
I have a master version on github now and everything goes well till that error again. And I don't feel comfortable placing that information in a github repository no matter it is private :)
If it has to be in the repository... then why do we put it in the deploy.php?
In anycase... I do think you've made it to read from the deploy.php... but currently... it's not doing that.
from luya-deployer.
So i think you are talking about the password for ssh connection, you can also use pem files or any other. The latest version of php deployer do not support password storage anymore. So maybe try this:
https://github.com/luyadev/luya-deployer/tree/add-idea-for-latest-deployer-version
But GIT is required anyhow
from luya-deployer.
Nope... I'm talking about ...
Error: SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: NO)
from luya-deployer.
https://github.com/luyadev/luya-kickstarter/blob/master/configs/config.php#L94-L100
from luya-deployer.
you could try to use ENV variables in your php process or something like this ;-) but the db information must be stored somewhere.
from luya-deployer.
Why do we have to put the db information into deploy.php if it doesn't read from there?
from luya-deployer.
Sorry, I was mistaken...
from luya-deployer.
But couldn't we add to the deploy.php for database connection info instead of leaving it on a third party website?
from luya-deployer.
database connection must be stored in the LUYA config. Sorry, maybe i don't understand what you are looking for. What do you mean by third party website?
Its just: you and your webserver. And deployer makes the connection and puts the config on the webserver, which holds the database information
from luya-deployer.
I mean github being the 3rd party website
from luya-deployer.
You pass that info to deployer though yes?
from luya-deployer.
Just to be clear:
GIT (whether github, gitlab, bitbucket or if you are consernd about security, create your own git server -its open source)
Deployer: Just makes the connection between your computer and the webserver which runs the website.
LUYA Config: The place you CAN put all your informations.
You could also use env variables http://php.net/getenv and store db connection somewhere as env variable on the webserver.
from luya-deployer.
By you... I mean you've created it to use a file we create called 'deploy.php' .. that when executed by ... 'luya'.... passes the info to the deployer vendor.
from luya-deployer.
luya deployer is just the PHP deployer (https://deployer.org/) project with some extra LUYA sugar on it. (https://github.com/luyadev/luya-deployer/blob/master/luya.php#L3)
from luya-deployer.
I was suggesting that when executing 'luya' it trap 'extra' info like production database connection details and pass 'that' onto deployer?
Haha Yes.. Sugar... just needs one more teaspoon full of sugar and all would be Hunky Dory :)
from luya-deployer.
Anyways... I can kill my prod server should anything go awry :) Only using for testing... but now maybe... just maybe... what I'm asking could be put down as a 'feature request'? :)
from luya-deployer.
Still... love your work Basil :)
from luya-deployer.
so you want to ENTER the connection for database while deploying, because of you don't want to store the database connection in git.
If this is the case, it would say this could be an option, but maybe it makes no sense to implement. Then better define those informations directly on your webserver with environment variables (like for example name DB_CONFIG_DSN
) and add getenv('DB_CONFIG_DSN') in your config, otherwise you would have to enter those informations every time you deploy. Unless connection is only allowed from localhost, its anyhow not possible to connect to the sql server ;-) just saying.
Update: For example with apache you can set env vars like so: https://httpd.apache.org/docs/2.4/mod/mod_env.html
from luya-deployer.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luya-deployer.