-
Go to Google Cloud Free Trial and sign up. You will get 300 dollars credit for 3 months.
-
Go to the console page: Console
-
If you don’t have any projects, a page that would guide you on how to start a project will pop up. Give your project a name.
-
In the search bar above on console page, enter 'Compute Engine' and click on
Compute Engine. -
If you have not activated billing for compute engine, click enable billing and choose your account to activate your Compute Engine. Your Google Compute Engine should be activated within a few minutes.
-
Click
Create instanceto create an instance. In machine type, choosesmall(1 shared vCPU). Choose whatever zone you like.In Boot Disk, choose
Ubuntu 14.04, and the disk size should be larger than 40GB. On the bottom of the page, clickManagement, disk, networking, access & security optionsto show more options. Inside of this, click into the tabNetworkingand chooseNew static IPinstead ofEphemeral. Enter a name for your IP. Google will assign a IP for you. Check the two boxesAllow HTTP trafficandAllow HTTPS traffic. Finally, clickCreateto create an instance. Wait a few minutes for the creation to complete. -
Once the creation has finished, click ssh below to establish web ssh connections.
-
In the Web Console, enter:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get -y install docker.io
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo docker build https://github.com/fossasia/susi_server.git
Once finished, the last line will provide the image ID, like Successfully built 4e11208a7b34. Copy or remember this id, we will need this id to tag the image.
Tag your image by entering sudo docker tag YOUR_IMAGE_ID susi. In my case, we enter sudo docker tag 4e11208a7b34 susi
Run our server by entering:
sudo docker run -d -p 80:80 -p 443:443 susi
Enter your assigned IP address into your browser to check if it is working.