0.2.0 • Published 6 years ago

mgserver v0.2.0

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

MGServer Guide (digital ocean server init automation)

This is a guide for how to create a digital ocean instance with:

  • Docker
  • Letsencrypt
  • Nginx (+ proxy_pass)

There are two "Getting Started" sections. One is a two liner, the other is more interactive.

Getting Started (Short Version)

# 1. Create a docker-machine
# 1.1 Setup DNS while this is being created (see below)...
docker-machine create --driver digitalocean --digitalocean-access-token $DIGITALOCEAN_ACCESS_TOKEN --digitalocean-monitoring=true --digitalocean-image=ubuntu-18-04-x64 --digitalocean-region=nyc3 <MACHINE_NAME>

# 2. Init server
mgserver init:remote <MACHINE_NAME>

Getting Started (Long Version)

# 1. Create a docker-machine
# 1.1 Setup DNS while this is being created (see below)...
docker-machine create --driver digitalocean --digitalocean-access-token $DIGITALOCEAN_ACCESS_TOKEN --digitalocean-monitoring=true --digitalocean-image=ubuntu-18-04-x64 --digitalocean-region=nyc3 <MACHINE_NAME>

# 2. ssh into the docker machine
docker-machine ssh <MACHINE_NAME>

# 3. Install nodejs v10
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - && sudo apt-get install -y nodejs

# 4. Install mgserver
npm install -g mgserver

# 5. Run mgserver init & fill out the prompts...
mgserver init

Setting up DNS

  1. Go to https://cloud.digitalocean.com/networking/domains
  2. Add app url.
  3. Add @ as an A record to redirect to droplet.
  4. Add www as an A record to redirect to droplet.

Google Domains

Source: https://www.digitalocean.com/community/tutorials/how-to-point-to-digitalocean-nameservers-from-common-domain-registrars#registrar-google-domains-beta

  1. Sign in to your Google Domains account.
  2. Select the domain name that you want to use with your Droplet.
  3. At the top of the screen, click on the icon that represents Configure DNS.
  4. Click on Use custom name servers
  5. Enter the following nameservers:
  • ns1.digitalocean.com
  • ns2.digitalocean.com
  • ns3.digitalocean.com
  1. Select Save to apply your changes. Now you are ready to move on to connecting the domain with your Droplet in the DigitalOcean control panel. Check out the Conclusion section below to read about what to do next.
0.2.0

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.1

8 years ago