print "Hello World!"
In my first article I want to present to you an introduction to Rancher and Hetzner - this is required for the next my articles.
Why Rancher with Hetzner? Answer is very simple - self-hosted and cheap cloud. This is for dev's who know not only how to configure domain DNS
Let's start right now :D
- Create account on Hetzner if you don't have yet
- When you login to Hetzner, create 1 server (name: CX21) with 2vCPU and 4GB RAM, don't forget to select Ubuntu (is default)
- When server was created login to root and run:
curl -fsSL https://get.docker.com -o get-docker.sh sh get-docker.sh
- Install
docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose
- Create dir for rancher
mkdir ~/rancher-docker && cd ~/rancher-docker && mkdir volume
- Create new file
docker-compose.yml
and paste config:
Uncommentversion: "3" services: rancher: image: rancher/rancher:v2.5.2 privileged: true ports: - "80:80" - "443:443" volumes: - ./volume:/var/lib/rancher restart: always #command: "--acme-domain your.domain"
command
if you want SSL - Run Rancher
docker-compose up -d
- Watch logs:
docker-compose logs rancher -f
Go to your server ip or domain if you configured and create admin account in Rancher
Now we can do something in next articles :)