Docker yml example run docker with configured ssl on Jelastic Environment
-
Select
Create a clean standalone engine
and check theInstall Portainer UI and Let's Encrypt SSL certificates
checkbox option
-
Inside of your DNS domain records settings page edit the A record and make it point this docker environment (here as example we assume that it is 1.2.3.4, you can easily take your public IP from jelastic, it's shown in green on the platform, see next point image to understand)
-
Click on the Add-Ons button of the created container, then click
Configure
inside of theLet's Encrypt Free SSL
Add-On. Then when required specify your owncustomdomain.com
-
Go on environment settings (through the yellow gear near the
Docker Engine CE
): click onCustom Domains
, add your owncustomdomain.com
as point 2 and clickBind
-
Change password as requested, I suggest you to use a browser generated strong password as a new password
-
Open terminal on the environment (
Web SSH
) and rungit clone https://github.com/danielemaddaluno/jeldock
(for a private repo you'll need a token) then move inside ot the folder using acd jeldock
Read this only if you need to checkout a different branch (not main), otherwise go to the next point. These are useful commands to check all branches and checkout a specific branch:
git clone https://github.com/danielemaddaluno/jeldock
cd jeldock
git fetch
git branch -a
git checkout -b Feature-ForPortainer remotes/origin/feature/Feature-ForPortainer
-
Then
cd servers_nginx
,nano nginx.conf
and change the line wherecustomdomain.com
with your own domain name (see the image to check what part has to be updated with your own domain name)
-
Now go back in jelastic folder (
cd ..
) and run adocker-compose up
to run the stack (you can monitor it from Portainer atcustomdomain.com:4848
)
-
If everything is ok you should see this at
https://customdomain.com
-
Finally add some rules to your firewall to protect Portainer (check the lines with priority 100 and 99). Here as example the IP 10.11.12.13 is considered to be your Work IP and with these rules it will be the only one to accept requests on the port 4848. This are some strongly suggested rules to improve security of your site