<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Docker on AnyStack</title><link>https://anystack.xyz/tag/docker/</link><description>Recent content in Docker on AnyStack</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Thu, 16 Aug 2018 15:43:46 +0000</lastBuildDate><atom:link href="https://anystack.xyz/tag/docker/index.xml" rel="self" type="application/rss+xml"/><item><title>How to use Nginx as reverse proxy with Docker</title><link>https://anystack.xyz/how-nginx-reverse-proxy-docker/</link><pubDate>Sun, 04 Sep 2016 06:57:00 +0000</pubDate><guid>https://anystack.xyz/how-nginx-reverse-proxy-docker/</guid><description>&lt;img src="https://anystack.xyz/images/2016/10/dockeenginx-1.png" alt="Featured image of post How to use Nginx as reverse proxy with Docker" /&gt;&lt;p&gt;I have already write &lt;a href="https://anystack.xyz/tag/easyengine/" target="_blank"&gt;some articles&lt;/a&gt; about &lt;a href="https://easyengine.io" target="_blank"&gt;EasyEngine&lt;/a&gt;, and I&amp;rsquo;m really in love with this command line tool, because it make Nginx easier to use than Apache. But I haven&amp;rsquo;t talk about all functionality of EE yet. If it provide you the ability to setup a WordPress website easily, you can also use EasyEngine to create a vhost for a static html website &amp;hellip; Or use Nginx as a reverse proxy !&lt;/p&gt;&#10;&lt;p&gt;And that make of EE the most complete tool available to use Nginx without having to read thousands of documentation pages to understand how to create a vhost. But don&amp;rsquo;t worry, this article will not only talk about this awesome tool which is EasyEngine.&lt;/p&gt;&#10;&lt;p&gt;I have used docker several times in the past, because it&amp;rsquo;s the fastest way to test an application without having to setup a VPS especially for that. But to run several Docker containers in a single VPS, it could quickly be a problem because some container provide you the ability to use a domain like WordPress for example. And some other will use directly your VPS IP and the port of your choice, which is not very friendly when your app is running on http://192.168.0.1:3000 &amp;hellip;&lt;/p&gt;&#10;&lt;p&gt;That&amp;rsquo;s why we will use Nginx to act as a reverse proxy for our Docker containers, and we will be able to run several containers on the same server and to access them with the domain of our choice. So the first step is to install Docker. Don&amp;rsquo;t worry you should not need to read the documentation if you are using a VPS with a recent linux distribution and a kernel 3.13+&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;### install Docker with a single command on debian/ubuntu/centos&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;wget -qO- https://get.docker.com/ | sh&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Docker is now running on your server ! So let&amp;rsquo;s install EasyEngine :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;## Install EasyEngine Debian7/8 or Ubuntu 14.04/16.04 LTS&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;wget -qO ee rt.cx/ee &amp;amp;&amp;amp; bash ee&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So we have now Docker and EasyEngine installed and we can launch our first Docker App before routing it with Nginx.&#10;We will start with Rocket.Chat, a complete live chat solution to build a community or to provide live support.&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;## Launch MongoDB container &#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;docker run --name db -d mongo:3.0 --smallfiles&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;## Run Rocket.Chat linked to the db and expose port 3000&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;docker run --name rocketchat -p 3000:3000 --env ROOT_URL=http://localhost --link db -d rocket.chat&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So you should be able to access to Rocket.Chat using http://YOUR-VPS-IP:3000.&#10;And to use Nginx as reverse proxy with your domain :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ee site create yourdomain.com --proxy=127.0.0.1:3000&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That&amp;rsquo;s it ! You can now use &lt;a class="link" href="http://yourdomain.com" target="_blank" rel="noopener"&#13;&#10; &gt;http://yourdomain.com&lt;/a&gt; to access to Rocket.Chat&lt;/p&gt;&#10;&lt;p&gt;Some other apps to run with Nginx as reverse proxy :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;## Hastebin&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;docker run --name redis -d redis&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;docker run --name hastebin -d -p 7777:7777 --link redis:redis -e STORAGE_HOST=redis rlister/hastebin&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;## Pasteboard&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;docker run --name pasteboard -e ORIGIN=mydomain.tld -e MAX=7 -v /srv/pasteboard/images:/pasteboard/public/storage -p 4000:4000 anthodingo/docker-pasteboard&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>[Review] Plesk - A powerful web server control panel</title><link>https://anystack.xyz/plesk-web-server-control-panel/</link><pubDate>Fri, 20 May 2016 15:08:00 +0000</pubDate><guid>https://anystack.xyz/plesk-web-server-control-panel/</guid><description>&lt;img src="https://anystack.xyz/images/2016/10/pleskonyx.png" alt="Featured image of post [Review] Plesk - A powerful web server control panel" /&gt;&lt;p style="text-align: justify;"&gt;Like anyone who want to manage easily multiple websites on a VPS or a dedicated server, i was looking for a control panel with good performance and ready for production.&#10;I have tested many control panels : (following panel are ranked by me and it's only my personal opinion)&lt;/p&gt;&#10;&lt;ol class="decimal" style="text-align: justify;"&gt;&#10;&lt;li&gt;CentOS webpanel (free) : To young to be use in production, but many good features (varnish cache + nginx + Apache) and it will be always free.&lt;/li&gt;&#10; &lt;li&gt;cPanel (paid) : The most powerful after plesk and cheap, but only compatible with Apache&lt;/li&gt;&#10; &lt;li&gt;Serverpilot.io (free and paid) : First cloud control panel, the easiest to run a WordPress website on a VPS. Many awesome features with the paid level (10$ / month) like free ssl, http2, nginx reverse proxy etc.. For me you should try it and it will be one of the best panel in the next years.&lt;/li&gt;&#10; &lt;li&gt;Ajenti (free) : Good panel with many features and a good compromise between interface configuration and text config. But i have no feeling with it.&lt;/li&gt;&#10; &lt;li&gt;Webmin (free) : If the design don't hurt your eyes, it's a complete control panel with many features and with good documentation.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p style="text-align: justify;"&gt;And the last which is not a control panel yet because it have no GUI, easyengine.io, only for Power User at the moment but one of the lightest web server manager, and a good website with many tutorials.&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;But today i will make a small review of Plesk, the best control panel for me.&lt;/p&gt;&#10;&lt;h2 style="text-align: justify;"&gt;1) What is Plesk ?&lt;/h2&gt;&#10;&lt;p&gt;&lt;img loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://anystack.xyz/images/2016/10/plesk_user-1.png"&gt;&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;&lt;b&gt;&#10;&lt;/b&gt;Plesk is a full control panel, you can manage multiple website with a clean web interface, it's really secured and always update.&#10;There are 3 pricing plans depending on what you want :&#10;- Web Admin (10 domains) : to run some website on a VPS it's perfect&#10;- Web Pro (30 domains) : including the WordPress toolkit, it's the best ratio quality/price&#10;- Web Host (no limit) : If you want to run your own web hosting services&lt;/p&gt;&#10;&lt;h2 style="text-align: justify;"&gt;2) But why should I choose Plesk as control panel ?&lt;/h2&gt;&#10;&lt;p style="text-align: justify;"&gt;&lt;b&gt;&#10;&lt;/b&gt;Because you can test it for free during 15 days ? No, it's not the only reason.&#10;I recommend to try (to use) Plesk because it's a control panel for any webmaster. There is 3 views available, from the beginner view with simple configuration (domain, database, ftp) to the power user view with full access to advanced features like nginx config, PHP config, firewall etc&#10;You can use Plesk with or without web hosting knowledge, and you will find a documentation for you at Plesk's website.&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;As you are waiting for features :&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;&lt;b&gt;For Beginner :&lt;/b&gt;&#10;- Website builder (you haven't to code)&#10;- Many Apps you can install in a single click : Wordpress (with themes, plugins and update management), Prestashop, PhpBB, MyBB, Drupal, Joomla&#10;- Security : SSL in 2 clicks with let's encrypt, backup to ftp or dropbox, webmail&#10;- Softaculous available (59 ready to install apps)&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;&lt;b&gt;For Power User&lt;/b&gt; (yes i know you are waiting for real features and it's for them i love Plesk) :&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;Performance :&#10;- Nginx reverse proxy with caching (disk or memcache)&#10;- Apache 2.4 with HTTP2&#10;- Multiple PHP version from 5.4 to 7.0 and PHP-FPM (so easy to use )&#10;- Many PHP extension : GD, ioncube, opcache,&#10;- Last MariaDB release&#10;- Litespeed web server (i haven't test it yet)&#10;- JXCore and NodeJS (if you want trending techno)&#10;- Java, ruby, python, .Net support&#10;- DNS management&#10;- Docker (only in Plesk Onyx, in beta currently)&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;Security :&#10;- Monitoring, logs, backup with increment&#10;- mod_security, firewall and fail2ban&#10;- SSL&#10;- Google authentication&#10;- Cloudflare integration&#10;- Antispam&#10;- Antivirus&#10;- file scanner&#10;- ddos protection&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;And if you want to (or already have) run your own web hosting company, Plesk is available as VMware or KVM image, with Cloudlinux (Linux distribution for hosting company)&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;I don't think i need to tell you more about Plesk features, but it's for them I use plesk in production. The most important for me is the security, and with fail2ban, a firewall, free ssl management and cloudflare integration,I'm sure to avoid most dangers.&#10;And the feature which decide me to choose Plesk is the Nginx Reverse proxy to handle all static files faster and with less res sources usage.&#10;But I'm maybe trying too much to sell you Plesk, so like it's a user review, I will also talk about the negative aspects of Plesk :&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;- There is a good documentation online, but if you have never use nginx before -&amp;gt; start learning how nginx work now because the Plesk documentation explain how it's work but there is not any how to .. I have lost many hours to understand nginx and how to configure it correctly with Plesk&#10;- There is no free version : if you can try it during 14 days, you have to pay after. And I recommend you to buy it from your hosting company if you can, it will be cheaper than the Plesk Store.&#10;Prices (for VPS) : 5$ for the Web Admin, 15$ for the Web Pro, 25$ for the Web Host&#10;But you can have nice discounts with your hosting company, and sometimes it will be free with a dedicated server. Currently I pay 9$ a month for the Web Pro.&#10;- There are many apps and extensions available but some of them are not free.&#10;- It can be frustrating sometimes (often ^^) to use a full control panel like Plesk, because you are not free to add modules to nginx, to install something not included in Plesk. It's a very powerful tools if you accept to use only included tools. Don't think about adding Pagespeed modules, or to setup a custom version of Apache. With the version 17, you can customize your PHP modules but not more.&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;There are good and bad aspects with Plesk, like any control panel but I recommend it to any beginner who want to start using a VPS and to manage himself. And I recommend it too, to Power Users because if you can't customize all components, you will have a stable and powerful web server with features normally reserved to "trending control panels in beta".&#10;So now it's time to add a referral link and to earn some money&#10;But i'm not a Plesk Partner yet ...&lt;/p&gt;&#10;&lt;h2 style="text-align: justify;"&gt;&lt;span style="font-size: medium;"&gt;Quick summary of my review :&lt;/span&gt;&lt;/h2&gt;&#10;&lt;p style="text-align: justify;"&gt;Control panel to try :&#10;Serverpilot.io ( everybody should try it )&#10;Plesk ( Read again from the beginning if you don't know why ..)&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;&lt;b&gt;FAQ :&lt;/b&gt;&#10;&lt;b&gt;&#10;Can I use Plesk if i'm a beginner ?&lt;/b&gt;&#10;Yes but you need to buy a VPS or a dedicated.&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;&lt;b&gt;Can I try it for free ?&#10;&lt;/b&gt;yes you only have to register with a valid email.&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;&lt;b&gt;How can i install it ?&#10;&lt;/b&gt;First Go to Plesk Website to read server requirement.&#10;On any recent linux OS :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;## Plesk 12.5 auto-installer&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sh &amp;lt;(curl http://autoinstall.plesk.com/one-click-installer || wget -O - http://autoinstall.plesk.com/one-click-installer)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;## Plesk Onyx auto-installer&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sh &amp;lt;(curl http://autoinstall.plesk.com/one-click-installer || wget -O - http://autoinstall.plesk.com/one-click-installer) --tier testing&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;## Run Plesk 12.5 with Docker&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;docker run --privileged -d -it -p 80:80 -p 443:443 -p 8880:8880 -p 8443:8443 -p 8447:8447 plesk/plesk&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;## Run Plesk Onyx with Docker&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;docker run -d -it -p 80:80 -p 443:443 -p 8880:8880 -p 8443:8443 -p 8447:8447 plesk/plesk:preview&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;&lt;b&gt;What OS should I choose for Plesk ? &lt;/b&gt;&#10;Debian 8 64Bits&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;&lt;b&gt;Can I install Plesk on a small VPS ?&lt;/b&gt;&#10;Yes, for testing i run it on a 3$ VPS with only 2GB RAM. But for production 4GB is a minimum if you use the mail server or the DNS server.&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;&lt;b&gt;I need some help with Plesk !&lt;/b&gt;&#10;Read the doc, browse Plesk knowledge base, and PM me if you don't find what you need.&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;&lt;b&gt;Plesk is too expensive for me !&#10;&lt;/b&gt;Buy it from your web hosting company to get nice discounts. With OVH -&amp;gt; Web Admin Plan cost 2$ a month on VPS&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;&lt;b&gt;Are you working for Plesk ?&#10;&lt;/b&gt;No, i have only lost too much time to setup web servers and to try many control panels before trying Plesk.&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;&lt;b&gt;I use another Panel currently, can i migrate to Plesk ?&#10;&lt;/b&gt;Yes, it's a paid solution, they always have many tools to help you to buy a license ^^&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;Feel free to ask anything about Plesk here. I'm also open to all suggestions or opinions.&lt;/p&gt;&#10;&lt;div style="text-align: center;"&gt;&lt;span style="font-size: medium;"&gt;&lt;b&gt;&lt;span style="color: #ff0000;"&gt;This review is my personal opinion about control panels. &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&#10;&lt;div style="text-align: center;"&gt;&lt;span style="font-size: medium;"&gt;&lt;b&gt;&lt;span style="color: #ff0000;"&gt;Plesk is maybe not the best control panel for you, and there are many alternative to Plesk.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&#10;</description></item></channel></rss>