Skip to main content

Work with Portainer

First login to Portainer

Open your Portainer address in browser (e.g. https://portainer.example.com). Add https to get to Portainer. When the page is opened you may see a warning that the SSL is not valid. It may take a few minutes while Traefik is getting properly signed certificate. Refresh page several times till the warning is disappeared.

When SSL certificate is installed, you will see a registration page. Fill in admin password, and you will be redirected to Portainer's home page with the list of all connected environments. There is only one predefined environment called primary. Select it by clicking once. On the next page select Stacks.

Stacks

Stacks are the same thing as docker compose yaml files.

Let's create a new stack right now. Give it name web_hello_world and copy this configuration to Web editor.

version: "2.4"

services:
test:
image: far4599/go-hello-world-http:latest
ports:
- "8080:8080"

And then click Deploy the stack button at the bottom of the page.

The stack will be deployed. You may check if it works correctly by visiting the page http://ip:8080 where ip shall be replaced with your server ip address. Hello World! is printed on the page.

Now you can deploy any application on your server just with a few clicks with the help of Portainer.

But what about SSL? Let's see how to setup our web_hello_world stack to be server through Traefik.