Skip to content

Docker yml example run docker with configured ssl on Jelastic Environment

License

Notifications You must be signed in to change notification settings

danielemaddaluno/jeldock

Repository files navigation

jeldock

Docker yml example run docker with configured ssl on Jelastic Environment

  1. Click on New Environment
    New Env

  2. Click the small arrow downnear the Customcontainer
    Custom Container

  3. Select Docker container
    Docker Container

  4. Select Create a clean standalone engine and check the Install Portainer UI and Let's Encrypt SSL certificates checkbox option
    Create Standalone

  5. 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)
    DNS Domain

  6. Click on the Add-Ons button of the created container, then click Configure inside of the Let's Encrypt Free SSL Add-On. Then when required specify your own customdomain.com
    Add-Ons

  7. Go on environment settings (through the yellow gear near the Docker Engine CE): click on Custom Domains, add your own customdomain.com as point 2 and click Bind
    Let's Encrypt

  8. Access to Portainer through provided credentials
    Portainer Login

  9. Change password as requested, I suggest you to use a browser generated strong password as a new password
    Portainer Change Password

  10. Open terminal on the environment (Web SSH) and run git clone https://github.com/danielemaddaluno/jeldock (for a private repo you'll need a token) then move inside ot the folder using a cd jeldock
    Git Clone 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
  1. Then cd servers_nginx, nano nginx.conf and change the line where customdomain.com with your own domain name (see the image to check what part has to be updated with your own domain name)
    nginx.conf edit

  2. Now go back in jelastic folder (cd ..) and run a docker-compose up to run the stack (you can monitor it from Portainer at customdomain.com:4848)
    docker-compose up

  3. The stack is created (pulled containers) and run
    Pulled containers stacked

  4. If everything is ok you should see this at https://customdomain.com
    customdomain running

  5. 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
    Firewall settings for Portainer

About

Docker yml example run docker with configured ssl on Jelastic Environment

Resources

License

Stars

Watchers

Forks

Packages

No packages published