Skip to content

Instantly share code, notes, and snippets.

@IrakliJani
Last active August 29, 2015 14:11
Show Gist options
  • Save IrakliJani/21f5d22e67ec698982ff to your computer and use it in GitHub Desktop.
Save IrakliJani/21f5d22e67ec698982ff to your computer and use it in GitHub Desktop.
DigitalOcean with Docker

Fresh Ubuntu with Docker on my DigitalOcean

General stuff

package updates

sudo apt-get update
sudo apt-get upgrade

install essential packages

sudo apt-get install git zsh

add my user & give permissions

adduser jani
visudo

install some sweet oh my zsh

curl -L http://install.ohmyz.sh | sh ### might need some csh

docker stuff

no clue yet

sudo docker run ubuntu echo "Hello World"
sudo usermod -a -G docker jani ### gimme docker
su -l jani

Nginx ftw!

install and hello world nginx!

sudo apt-get install nginx ### yep. that's it
mkdir ~/www
touch ~/www/index.txt
echo 'Hello World -_-' > ~/www/index.txt

edit /etc/nginx/sites-available/default

server {
  listen 80 default_server;
  listen [::]:80 default_server ipv6only=on;

  server_name localhost;

  root /home/jani/www;
  index index.html index.txt;

  location / {
    try_files $uri $uri/ =404;
  }
}

Reload nginx sudo service nginx restart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment