Developer guide: getting started - ManvilleFog/buttonmen GitHub Wiki
How to start developing
We are provisionally planning to use this repo and http://pagodabox.com for testing. Here's how to get started.
Get some accounts
- Sign up for a github account at: https://github.com/signup
- Sign up for a Pagoda Box account at: https://dashboard.pagodabox.com/account/register. (Note: don't choose "Login with GitHub" --- it doesn't do what you want. While we haven't tried it, we suspect that the other external service logins won't work any better. Create a brand new account at Pagoda Box itself.)
Fork a repository
- Login to github
- Browse to the main buttonmen repository: https://github.com/buttonmen-dev/buttonmen
- Click the "Fork" button, and follow the instructions. For convenience, name your primary fork "buttonmen" also, so it will show up at: https://github.com/$yourusername/buttonmen
Setup an (empty) application at Pagoda Box
- Login to Pagoda Box
- At https://dashboard.pagodabox.com/, click "Start New Application":
- How to start: Empty repo
- Name: $yourusername-buttonmen
- Launch
- On the dashboard page where you are now, you'll find a place to upload an SSH public key. Create a new key if you need to (http://help.pagodabox.com/customer/portal/articles/200927#setup-ssh-keys), or upload an existing one. (This is the key which you'll use to push from your local git clone to the shared repo, so the private key should be on the machine where you are doing your development, e.g. your desktop or laptop.)
Setup your git development environment
Do all of this on your desktop or laptop, or wherever you will be doing local development.
- Clone a copy of your forked repository:
username=<your username>
git clone https://github.com/$username/buttonmen.git
- Add the primary fork as a git remote named "upstream", so you'll be able to merge in other people's changes:
cd buttonmen
git remote add upstream https://github.com/buttonmen-dev/buttonmen.git
git fetch upstream
git merge upstream/master
- Add the pagoda repository as a git remote named "pagoda", so you can push to your Pagoda Box to test your code:
git remote add pagoda [email protected]:$username-buttonmen.git
Test pushing your code
Whenever you want to push code, do this:
- Make any changes you want, and commit them:
git commit ...
- Push the changes to pagoda:
git push pagoda master
You will be prompted for your SSH passphrase. Once you enter it, the commit should succeed, and pagoda should automatically start initializing your box. This should look something like:
_______________________
BUILDING INFRASTRUCTURE
"""""""""""""""""""""""
+> Init submodules
Once it's done, you can browse to http://$yourusername-buttonmen.gopagoda.com, and look at your dev site.
Setup SSH access to your Pagoda Box instance for debugging
This is a one-time step (you won't need to redo it when you make new git commits). It is optional, and will allow you to SSH into $[email protected] and look at your PHP and Apache error logs.
- Go to the admin options for your pagoda repo: https://dashboard.pagodabox.com/apps/$yourusername-buttonmen/edit
- Enable SSH login and set a password.