Skip to content

Instantly share code, notes, and snippets.

@ali2077
Created January 28, 2019 14:55
Show Gist options
  • Save ali2077/52ebedc991542e40eba65ed68b7fe900 to your computer and use it in GitHub Desktop.
Save ali2077/52ebedc991542e40eba65ed68b7fe900 to your computer and use it in GitHub Desktop.
The Simplest Way to Manage Your Entire Dev Infrastructure! AT http://localhost:8090
###https://github.com/koding/koding
#Koding
#Docker Pulls
#The Simplest Way to Manage Your Entire Dev Infrastructure!
#Koding is a development platform that orchestrates your dev environment. Developers get everything they need to spin up full-stack, project-specific environments in seconds. Share them, update them, and manage infrastructure from a simple interface.
#Quick Start with Docker-Compose
#Easiest way to run Koding is to install docker-compose which can be found here. For the rest you can follow these steps:
git clone https://github.com/koding/docker-compose.git koding-docker-compose
cd koding-docker-compose
# Requires docker-compose version >= 1.6
docker-compose up -d
Now you are able to access Koding via port 8090 (e.g. localhost:8090) on your host.
Run Koding on Koding.com
Yes, you can run koding on koding.com by using the provided .koding.yml
For more information about stacks: koding.com/docs
Getting started for Development
You need to install following software packages to run Koding:
git
docker
docker-compose
Start developing
You are now ready to run Koding.
git clone https://github.com/koding/koding.git
cd koding
docker-compose -f docker-compose-init.yml run init
docker-compose up
If you don't have a powerful computer, this may take a while at first, slow computers may take up to 15 minutes before they build the entire system. Please be patient. Once it is up and running, everything will be smooth and very fast.
Now you can navigate to http://localhost:8090 to see your local Koding instance. Enjoy! (If you don't see it, keep waiting, it will show up)
When you edit files on your host computer, they will be visible in the runtime environment. Watchers will automatically restart backend workers, re-compile frontend code. You don't need to do anything for it.
Tips
If you need to execute some commands in runtime environment, here is how you can start a shell in backend service container:
docker-compose exec backend bash
You can follow coffeescript-styleguide that we are relying on.
Running Koding on Local Machine
This is if you don't want to do docker-compose way and install everything locally, (not recommended).
Software Prerequisites
Go v1.7
Node.js v0.10
CoffeeScript v1.8.0
Supervisor
Start developing
Follow these steps for running the instance:
git clone https://github.com/koding/koding.git /your/koding/path
cd /your/koding/path
node -v # make sure your node version is not greater than `0.10.x`
npm -v # make sure your npm version is 2.15.x
coffee -v # make sure your coffeeScript version must be 1.8
npm install
You should have packages ready for running build specific scripts.
./configure # create necessary config files
./run install # start to install dependencies
./run buildservices # build the services
./run # run all services
As a result, you will have a file watcher watching your backend files (both node, and golang) and restart services when it's necessary. Now open up another terminal and run following commands:
cd /your/koding/path
cd client # move into frontend client folder
npm install # install client dependencies
make # this will run a client watcher for you
Right now you should have 2 different watchers for (1) your backend files, (2)for your frontend client files. Now you can navigate to to see your local Koding instance. Enjoy!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment