|
|
This page is a work-in-progress towards the definition of standard development and deployment workflows for Ecobytes projects. It is focused on the use of git, lab and dokku.
|
|
|
|
|
|
## Deployment branch
|
|
|
## Get the project repository
|
|
|
|
|
|
## Setup upstreams
|
|
|
|
|
|
These show the upstreams used currently on this documentation
|
|
|
|
|
|
$ git remote -v
|
|
|
dokku dokku@apps.ecobytes.net:frab (fetch)
|
|
|
dokku dokku@apps.ecobytes.net:frab (push)
|
|
|
origin https://lab.allmende.io/ecobytes/dbp2016.git (fetch)
|
|
|
origin https://lab.allmende.io/ecobytes/dbp2016.git (push)
|
|
|
|
|
|
### dev-stage-live workflow
|
|
|
|
|
|
This is a proposal for improving deployment workflows and would require each project to run three dokku instances.
|
|
|
|
|
|
* origin for lab.allmende.io
|
|
|
* dev for apps.ecobytes.net:app-dev
|
|
|
* stage for apps.ecobytes.net:app-stage
|
|
|
* live for apps.ecobytes.net:app-live
|
|
|
|
|
|
> TODO: complete this with proper commands and a good log of git remote -v
|
|
|
|
|
|
## Use deployment branch
|
|
|
|
|
|
Between releases, code to be deployed in testing instances should always be merged on deployment
|
|
|
|
|
|
> DISCUSS: should we rather have dev, stage and prod branches, which are always deployable on respective dokku instances?
|
|
|
> DISCUSS: should we rather have dev, stage and live branches, which are always deployable on respective dokku instances (see above)?
|
|
|
|
|
|
### Checkout deployment to the local machine
|
|
|
|
... | ... | @@ -30,7 +53,8 @@ Assuming that you kept the upstream and local in sync, you can opt to: |
|
|
$ git checkout deployment
|
|
|
$ git merge is49
|
|
|
|
|
|
## Conflict resolution
|
|
|
|
|
|
## Dealing with conflicts
|
|
|
|
|
|
If the code has meanwhile been changed by commits merged into the branch later than when you fetched it, it is probably that a merge conflict occurs. A conflict needs to be manually solved locally.
|
|
|
|
... | ... | @@ -57,8 +81,14 @@ Once you are done inspecting the file logic and merging everything coherently, d |
|
|
$ git commit
|
|
|
$ git push
|
|
|
|
|
|
## Dokku deployment
|
|
|
## Launch the deployment magic!
|
|
|
|
|
|
As you have your new commit, just do:
|
|
|
|
|
|
$ git push dokku deployment:master
|
|
|
|
|
|
This is pushing the deployment branch to dokku remote master, as it only recognizes master branches.
|
|
|
|
|
|
See the [other wiki page](_deployment) for instructions
|
|
|
Then watch the magic happen and after some time the instance will have been updated.
|
|
|
|
|
|
> TODO: merge last section of that page |
|
|
\ No newline at end of file |
|
|
> TODO: merge last section of the [deployment wiki page](_deployment) |
|
|
\ No newline at end of file |