Setup box on DigitalOcean
Setup box
Note: Even without the video, you can learn all the crucial details from the steps that are documented below
Login to DigitalOcean. You can use a personal account or request access to your company account.
Provision a machine with docker pre-installed.
Optionally, we recommend that you map your
<machine-ip>
to a friendly domain name like<myName-cloud-box-1.domain.com>
If you have a CloudFlare account, use it.
Configure cloudflare for DNS only. Bypass any HTTP related CDN.
This may take some time to take effect and will hopefully be ready for you to use by the time you finish rest of the steps.
Use
ssh
to login:ssh root@<machine-ip>
Install
docker-compose
on your cloud box. You can copy-paste the following script, which is a multi-line command and it will "just work."Install
nvm
to manage NodeJSAt this point you have a powerful and scalable setup. We will put it to good use as we explore various exercises in this training guide.
Let's do a small exercise to show off the power of this setup.
Clone a sample github project and launch it:
What did we just do?
Cloned a project.
Installed dependencies.
Finally the
docker-compose up
command:launched the app by mounting the local source code and dependencies into a docker container,
and launched MongoDB as its database.
Let's browse to
http://<machine-ip>:3000/explorer
to see a fully working REST~ful API!If you had setup a DNS record previously then you can also try:
http://<myName-cloud-box-1.domain.com>:3000/explorer
to see a fully working REST~ful API!
What's Remaining?
The cloud-box doesn't have an SSH key generated for it yet! We should provide manual or automated steps for generating such a key and wiring it up to a developer's MVP accounts like github.
Last updated