<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Ayrton</title>
    <description>The latest articles on Forem by Ayrton (@simerca).</description>
    <link>https://forem.com/simerca</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F465002%2F2077ffb2-ba42-46e0-b136-74bd8df7a3b4.png</url>
      <title>Forem: Ayrton</title>
      <link>https://forem.com/simerca</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/simerca"/>
    <language>en</language>
    <item>
      <title>I created the first interplanetary exchange platform.</title>
      <dc:creator>Ayrton</dc:creator>
      <pubDate>Tue, 10 May 2022 18:00:54 +0000</pubDate>
      <link>https://forem.com/simerca/i-created-the-first-interplanetary-exchange-platform-61d</link>
      <guid>https://forem.com/simerca/i-created-the-first-interplanetary-exchange-platform-61d</guid>
      <description>&lt;p&gt;Good morning !&lt;br&gt;
Yes very ambitious as a title, but that's all.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let's start with the beginning :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Some time ago, I thought about an optimized commentary for a few points of a &lt;strong&gt;rocket launch specification.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After a few weeks of research, I found a working topic regarding payloads in the rocket fairing head.&lt;/p&gt;

&lt;p&gt;The difficulty today for space agencies and private launchers is &lt;strong&gt;optimizing this space and managing to fit useful volumes into a cylinder several meters high.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Short.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I worked on an optimization topic, pitched my concept to someone in the business, and presented a useful space optimization algorithm. &lt;strong&gt;I was then invited to my first astronaut conference.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Then an idea came to me.&lt;/p&gt;

&lt;h2&gt;
  
  
  The first interplanetary e-commerce platform based on the Stellar Lumens (XLM) blockchain
&lt;/h2&gt;

&lt;p&gt;My ambitions were to &lt;strong&gt;facilitate exchanges between the various space service providers&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;To do this, I imagined a platform, operating on the principle of the blockchain. &lt;/p&gt;

&lt;p&gt;Who can any operator on Earth or from a space station or another planet to be able to order products from a partner. &lt;/p&gt;

&lt;p&gt;It could take advantage of the spaces made available by private space companies that sell the payload space in their rocket fairing head.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A problem quickly arises, what do I do when the connection does not exist?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I imagined an application installed on the client (computer, micro computer, smartphone etc...), which is practically autonomous, and which signs the transactions directly via the client. &lt;/p&gt;

&lt;p&gt;Once the synchronization has been carried out again, the signature is authenticated by the rest of the nodes of this chain and therefore is validated or not (in the event of cheating) by the blockchain.&lt;/p&gt;

&lt;p&gt;This system allows all operators to be sure that the order has been made by the right customer. Fraud is only possible if your secret key is stolen.&lt;/p&gt;

&lt;p&gt;I decided to make this work Open Source under &lt;strong&gt;MIT license.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can find details of my work here:&lt;br&gt;
&lt;a href="https://github.com/Simerca/itpmarket"&gt;https://github.com/Simerca/itpmarket&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And the demo:&lt;br&gt;
&lt;a href="https://itp-platform.netlify.app/"&gt;https://itp-platform.netlify.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Glad to read you about this crazy idea &amp;lt;3&lt;/p&gt;

</description>
      <category>space</category>
      <category>vue</category>
      <category>javascript</category>
      <category>blockchain</category>
    </item>
    <item>
      <title>How sports made me a better developer</title>
      <dc:creator>Ayrton</dc:creator>
      <pubDate>Sat, 29 Jan 2022 12:37:42 +0000</pubDate>
      <link>https://forem.com/simerca/how-sports-made-me-a-better-developer-3ebp</link>
      <guid>https://forem.com/simerca/how-sports-made-me-a-better-developer-3ebp</guid>
      <description>&lt;p&gt;It's been several weeks since I got into the sport,&lt;/p&gt;

&lt;p&gt;I give you the little anecdote that goes well, 65 Kilos in 2018 -&amp;gt; 100 kilos in March 2020.&lt;/p&gt;

&lt;p&gt;In fact, I left a job in the restaurant business where I moved around so much and even eating badly I kept my weight of 65 kilos, once I started my new job as an independent developer, I spent 2 years not stop in an office. Without moving, still eating badly. And that was other things.&lt;/p&gt;

&lt;p&gt;I didn't fit in any of my clothes anymore and I had to redo a big part of my wardrobe because I was gaining weight. From one month to another I could no longer put my newly acquired things.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Click?&lt;/strong&gt;&lt;br&gt;
I no longer liked the way I looked in the mirror. And when you start not loving yourself anymore, you enter a complicated phase of your life.&lt;/p&gt;

&lt;p&gt;Desire for nothing, loss of energy and motivation, feeling of being useless and heavy. And also happened something that I did not know at all, &lt;strong&gt;Weightism&lt;/strong&gt; .&lt;/p&gt;

&lt;p&gt;Whenever I saw someone I hadn't seen in a long time, there was always a hint of the size of my belly. And once I was offered the front seat in the car, because otherwise they would be tight behind.&lt;/p&gt;

&lt;p&gt;That was all the trigger. One, I didn't feel well, and two, I was never used to being insulted by others.&lt;/p&gt;

&lt;p&gt;I took matters into my own hands in March 2021, a year after my weight gain, I was already at 100kg.&lt;/p&gt;

&lt;p&gt;At the beginning of the year, I started doing sports in the gym, Basic Fit type; but the experience was a failure, lack of motivation to go there and not really any results, I didn't really know what to do so I stayed in the comfort of the easy machines.&lt;/p&gt;

&lt;p&gt;Then I lost a lot by doing more sport at home, every evening when I got home from the office, but my motivation, like in the gym, quickly flew away, I had however lost nearly 4 kilos during this period.&lt;/p&gt;

&lt;p&gt;After that I had moments of breaks, where I clearly didn't care anymore. I then then undertook to find a personal coach not without knowing that it was expensive.&lt;/p&gt;

&lt;p&gt;Then I found a great program, indoor cycling. And that's the kif, firstly we're in a group, so it's motivating, secondly the coaches are great, and since it's in a group, it's also less expensive, but personalized all the same, and thirdly there has a huge screen behind which projects videos which gives a semblance of decor it was enough to convince the geek who lies dormant in me, and also music at the bottom to be immersed in the universe! And I've stuck to it ever since I signed up.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6jd5oivdc6j72qn4h6ck.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6jd5oivdc6j72qn4h6ck.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I lost 7 (edit 11 May 2022: &lt;strong&gt;22&lt;/strong&gt; for now :D) kilos in a month and a half . And the motivation is still more than ever.&lt;/p&gt;

&lt;h2&gt;
  
  
  So to answer the original question (I know I got a bit lost), How has sport made me a better developer?
&lt;/h2&gt;

&lt;p&gt;It's very simple. I took down the screens, and I devoted myself to other activities. Sport, my balanced diet, spending time with my family. And even if it seems counterproductive it is not at all! On the contrary, when I do my developer tasks, I perform much better. Because sport is also a way to unload, and to restore pep to your body and your mind, it is therefore very beneficial for your daily tasks and your lifestyle.&lt;/p&gt;

&lt;p&gt;I also noticed that this sport goal also allowed me to take on new skills. That of going to the end of things. Today each project is realized. And like in sport, even if it's not perfect, I will go after things.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Group work does:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Strengthened the mind&lt;/li&gt;
&lt;li&gt;Broken the barriers of shyness (we shout at sport to encourage each other, it feels so good)&lt;/li&gt;
&lt;li&gt;Want to give the best of yourself for the group&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Today I am at 89 kilos (edit 11 May 2022: 78). I still have a little to lose (I'm 1m73). But I'm proud of what I'm accomplishing, and I feel so much better about myself!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And that too is one of the things that makes me a better developer.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading me!&lt;/p&gt;

</description>
      <category>sport</category>
      <category>devjournal</category>
      <category>discuss</category>
      <category>motivation</category>
    </item>
    <item>
      <title>How I have made an online game in production in less than 1 year</title>
      <dc:creator>Ayrton</dc:creator>
      <pubDate>Thu, 23 Dec 2021 13:44:34 +0000</pubDate>
      <link>https://forem.com/simerca/how-i-have-made-an-online-game-in-production-in-less-than-1-year-3ga6</link>
      <guid>https://forem.com/simerca/how-i-have-made-an-online-game-in-production-in-less-than-1-year-3ga6</guid>
      <description>&lt;p&gt;Hi ! My name is Ayrton, I’m french developper from Bordeaux.&lt;/p&gt;

&lt;p&gt;I made games since I have 6 years old, and after lot of try of making game, this year I will wanted to make an online game.&lt;/p&gt;

&lt;p&gt;Today I want to show at all person who said me, “It’s impossible to make online game alone, blablablabla….)” It’s possible and I show you how.&lt;/p&gt;

&lt;p&gt;My first challenge It’s find an easy  concept to develop, I will take a look on other success projects. After this, I have choose an online Arena game like Brawl Star but 1 vs 1 and with another camera view.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--j2qF2jJJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/1%2AmWclEYN0sjjqAhZ0IQYI5A.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--j2qF2jJJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/1%2AmWclEYN0sjjqAhZ0IQYI5A.png" alt="" width="880" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  MVP Concept
&lt;/h1&gt;

&lt;p&gt;To my job, I always use this concept, the Minimum Viable Product, to determine a plan to complete the game, and I etablish a list of functionality essential for the gameplay, but just the minimum.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---iSOx590--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/1%2AlLhmCq1j2wBMxC3uBLCx8g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---iSOx590--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/1%2AlLhmCq1j2wBMxC3uBLCx8g.png" alt="" width="880" height="491"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Tools
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Engine&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I have use Unity for made the game with C# language, for simple reason;&lt;/p&gt;

&lt;p&gt;Fast, easy to learn, Documented, Cross-Plateform, Gameplay requirement satisfied (3D, Online, Controller Support, Mobile etc…).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://unity.com/"&gt;Link for Unity&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3D Tool&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Blender is a free and open source 3D modeling tool. I’m not an 3D artist, and he have lot’s of tutorial for beginner.&lt;/p&gt;

&lt;p&gt;At start, It’s very hard to do your first item (a table for me :) ) And after lot’s of hour to try, I have made my first character.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.blender.org/"&gt;Link for Blender&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UI Design&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;XD + Photoshop&lt;/p&gt;

&lt;p&gt;Why Adobe XD? I think it’s more simple for made rapid graphics interfaces than Photoshop. Easy for use and easy export.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.adobe.com/fr/products/xd.html"&gt;Link for Adobe XD&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Let’s talk about talents.
&lt;/h1&gt;

&lt;p&gt;I have lot’s of talents (no !) but I cant draw, painting, or make music. I’m not an artist, I’m a worker, give me task and I do it.&lt;/p&gt;

&lt;p&gt;So when I start to need graphics and sound design, my look take direction to Aurore and Domi, my wife and a friend. Aurore it’s a great artist, she made paint, and Domi has a talent on sound design and it’s a great composer. I demand to they, to make 3 characters and 3 musics . I have proposed to payed they, but they refused and 3 weeks after, all are shipped. Very great person. Love you.&lt;/p&gt;

&lt;p&gt;At same time, I have started to code the netcode, I have use an Unity Package who help me to integrate online system inside our game. It’s called &lt;a href="https://mirror-networking.com/"&gt;Mirror&lt;/a&gt; .&lt;/p&gt;

&lt;p&gt;1 month later, the netcode works.&lt;/p&gt;

&lt;h1&gt;
  
  
  Network Infrastructure
&lt;/h1&gt;

&lt;p&gt;At my job, I’m french developper full stack, so, I know how a server work, and how to manage it and monitoring it for the production. But, habitualy it’s web service like API, not Game server engine.&lt;/p&gt;

&lt;p&gt;Docker save me. I have use Docker for his capability to duplicate instances. 1 Docker instance = 1 party for 2 player in our game . So if I have 10 users want to play simultanously. I will mount 5 instances, 1 instances take ~1cpu and ~250mb memory when a game is playing. So the duplication it’s essential inside our deployment plan.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QvM2xY5Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/1%2ABtbVf47T3dvyNF99avxlxw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QvM2xY5Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/1%2ABtbVf47T3dvyNF99avxlxw.png" alt="" width="880" height="522"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have use Digital Ocean and Scaleway to test our server in development mode on 3 countrys. And it’s look great.&lt;/p&gt;

&lt;p&gt;I have made 2 scripts for easy launch new servers and attach they IP automaticly in my APi system who attribute to server an unique ID and know who it’s started or no.&lt;/p&gt;

&lt;p&gt;I have use Grafana and Prometheus to monitoring and set alert when problem appear.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://prometheus.io/docs/visualization/grafana/"&gt;Link to Grafana/Prometheus&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gnZ2GwdJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/1%2Ad3_BsCB3eEdh3JPnEHCXSA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gnZ2GwdJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/1%2Ad3_BsCB3eEdh3JPnEHCXSA.png" alt="" width="880" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Integration
&lt;/h1&gt;

&lt;p&gt;It’s the most difficult thing I think, because when you test your game with Cube and Ball you don’t need some animations and game design.&lt;/p&gt;

&lt;p&gt;But when I started to integrate character, the difficult for me was to animate it and take it live.&lt;/p&gt;

&lt;p&gt;I have started by 4 animations / characters, Idle, Walk, Attack, Dead.&lt;/p&gt;

&lt;p&gt;All of character has nearly the same animations, It’s more easy for the script controllers.&lt;/p&gt;

&lt;p&gt;And&lt;/p&gt;

&lt;p&gt;I have started to integrate environnement and design of arenas too. It take me about 3 month to achieve all of this ! &lt;strong&gt;Very difficult …&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And like it’s not hard enough, I was do the trick for Online System, so other player can see, other animations. Hell.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Zj-thFuT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/1%2AQlJoTwOqGGAAfY-T1WGO2A.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Zj-thFuT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/1%2AQlJoTwOqGGAAfY-T1WGO2A.png" alt="" width="880" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From / To&lt;/p&gt;

&lt;h1&gt;
  
  
  Write blogs posts
&lt;/h1&gt;

&lt;p&gt;Write blogs posts, help me to achieve my work, It’s a good thing for stay motivated and share my experience. See the progress it’s a great thing for considerate the work accomplish;&lt;/p&gt;

&lt;p&gt;you can see all the blog posts here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://simercastudio.com"&gt;Simerca Studio&lt;br&gt;--------------&lt;br&gt;### Editeur de jeux vidéos&lt;br&gt;simercastudio.com&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Lot’s of test’s after.
&lt;/h1&gt;

&lt;p&gt;After I have tested the game with friend, family, discord members, I start to publish It to App Store and Play Store.&lt;/p&gt;

&lt;p&gt;Because in my job I have already post project to App Store and Play Store, I know the requirement to do this.&lt;/p&gt;

&lt;p&gt;And after 2 try, It will be posted .&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yUWAmQok--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/1%2AFQWT3icGSUE6OJ95EciNKg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yUWAmQok--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/1%2AFQWT3icGSUE6OJ95EciNKg.png" alt="" width="880" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fantasy Arena it’s available on iOS and Android on production in less than 1 year.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;More informations&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://simercastudio.com"&gt;Simerca Studio&lt;br&gt;--------------&lt;br&gt;### Editeur de jeux vidéos&lt;br&gt;simercastudio.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>unity3d</category>
      <category>csharp</category>
      <category>programming</category>
    </item>
    <item>
      <title>Best Centos Docker Server</title>
      <dc:creator>Ayrton</dc:creator>
      <pubDate>Tue, 07 Sep 2021 08:54:43 +0000</pubDate>
      <link>https://forem.com/simerca/best-centos-docker-server-13pn</link>
      <guid>https://forem.com/simerca/best-centos-docker-server-13pn</guid>
      <description>&lt;p&gt;Fast install for docker on Centos&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo yum install -y yum-utils
sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install -y docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
sudo docker network create web
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>GDAL on Amazon Linux</title>
      <dc:creator>Ayrton</dc:creator>
      <pubDate>Tue, 20 Jul 2021 09:46:30 +0000</pubDate>
      <link>https://forem.com/simerca/gdal-on-amazon-linux-21e8</link>
      <guid>https://forem.com/simerca/gdal-on-amazon-linux-21e8</guid>
      <description>&lt;p&gt;Install GDAL on Amazon Linux (Centos)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;yum &lt;span class="nt"&gt;-y&lt;/span&gt; update
&lt;span class="nb"&gt;sudo &lt;/span&gt;yum-config-manager &lt;span class="nt"&gt;--enable&lt;/span&gt; epel
&lt;span class="nb"&gt;sudo &lt;/span&gt;yum &lt;span class="nt"&gt;-y&lt;/span&gt; &lt;span class="nb"&gt;install &lt;/span&gt;make automake gcc gcc-c++ libcurl-devel proj-devel geos-devel
&lt;span class="nb"&gt;cd&lt;/span&gt; /tmp
curl &lt;span class="nt"&gt;-L&lt;/span&gt; http://download.osgeo.org/gdal/2.0.0/gdal-2.0.0.tar.gz | &lt;span class="nb"&gt;tar &lt;/span&gt;zxf -
&lt;span class="nb"&gt;cd &lt;/span&gt;gdal-2.0.0/
./configure &lt;span class="nt"&gt;--prefix&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/usr/local &lt;span class="nt"&gt;--without-python&lt;/span&gt;
make &lt;span class="nt"&gt;-j4&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;make &lt;span class="nb"&gt;install
cd&lt;/span&gt; /usr/local
&lt;span class="nb"&gt;tar &lt;/span&gt;zcvf ~/gdal-2.0.0-amz1.tar.gz &lt;span class="k"&gt;*&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>aws</category>
      <category>gdal</category>
      <category>weather</category>
    </item>
    <item>
      <title>Best Makefile for Docker project (M1 Compatible)</title>
      <dc:creator>Ayrton</dc:creator>
      <pubDate>Fri, 16 Jul 2021 07:13:07 +0000</pubDate>
      <link>https://forem.com/simerca/best-makefile-for-docker-project-m1-compatible-516p</link>
      <guid>https://forem.com/simerca/best-makefile-for-docker-project-m1-compatible-516p</guid>
      <description>&lt;p&gt;Hi !&lt;/p&gt;

&lt;p&gt;Here is the best Makefile ever,&lt;/p&gt;

&lt;p&gt;It's now easy to use Registry Gitlab to push your docker images and use repo name as image name.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight make"&gt;&lt;code&gt;&lt;span class="nv"&gt;REGISTRY_ID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;shell&lt;/span&gt; &lt;span class="nb"&gt;grep &lt;/span&gt;gitlab.com .git/config|sed &lt;span class="s1"&gt;'s/url = https:\/\//registry./g'&lt;/span&gt;|sed &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"s/&lt;/span&gt;&lt;span class="se"&gt;\.&lt;/span&gt;&lt;span class="s2"&gt;git&lt;/span&gt;&lt;span class="nv"&gt;$$&lt;/span&gt;&lt;span class="s2"&gt;//g"&lt;/span&gt;|xargs&lt;span class="nf"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;TAG&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;shell&lt;/span&gt; git symbolic-ref &lt;span class="nt"&gt;--short&lt;/span&gt; &lt;span class="nt"&gt;-q&lt;/span&gt; HEAD|sed &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s1"&gt;'s/master$$/latest/g'&lt;/span&gt;|sed &lt;span class="s1"&gt;'s/\([a-zA-Z]*\)\//\1-/g'&lt;/span&gt;&lt;span class="nf"&gt;)&lt;/span&gt;

&lt;span class="nl"&gt;build&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
    docker build &lt;span class="nt"&gt;-t&lt;/span&gt; &lt;span class="nv"&gt;$(REGISTRY_ID)&lt;/span&gt;:&lt;span class="nv"&gt;$(TAG)&lt;/span&gt; .

&lt;span class="nl"&gt;run&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;build&lt;/span&gt;
    docker run &lt;span class="nt"&gt;--rm&lt;/span&gt; &lt;span class="nv"&gt;$(REGISTRY_ID)&lt;/span&gt;:&lt;span class="nv"&gt;$(TAG)&lt;/span&gt; 

&lt;span class="nl"&gt;dev&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
    docker run &lt;span class="nt"&gt;--rm&lt;/span&gt; &lt;span class="nv"&gt;$(REGISTRY_ID)&lt;/span&gt;:&lt;span class="nv"&gt;$(TAG)&lt;/span&gt; 

&lt;span class="nl"&gt;push&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
    docker push &lt;span class="nv"&gt;$(REGISTRY_ID)&lt;/span&gt;:&lt;span class="nv"&gt;$(TAG)&lt;/span&gt;

&lt;span class="nl"&gt;pushm1&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
    docker buildx build &lt;span class="nt"&gt;--platform&lt;/span&gt; linux/amd64 &lt;span class="nt"&gt;--push&lt;/span&gt; &lt;span class="nt"&gt;-t&lt;/span&gt; &lt;span class="nv"&gt;$(REGISTRY_ID)&lt;/span&gt;:&lt;span class="nv"&gt;$(TAG)&lt;/span&gt; .

&lt;span class="nl"&gt;buildm1&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
    docker buildx build &lt;span class="nt"&gt;--platform&lt;/span&gt; linux/amd64 &lt;span class="nt"&gt;-t&lt;/span&gt; &lt;span class="nv"&gt;$(REGISTRY_ID)&lt;/span&gt;:&lt;span class="nv"&gt;$(TAG)&lt;/span&gt; .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Realy easy to use:&lt;/p&gt;

&lt;p&gt;Build images&lt;br&gt;
&lt;code&gt;make build&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Push images&lt;br&gt;
&lt;code&gt;make push&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Run images&lt;br&gt;
&lt;code&gt;make run&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Test images&lt;br&gt;
&lt;code&gt;make dev&lt;/code&gt;`&lt;/p&gt;

&lt;p&gt;For Mac M1 Chip, to use for build AMD64 images&lt;/p&gt;

&lt;p&gt;Build for amd64 when your use macbook m1&lt;br&gt;
&lt;code&gt;make buildm1&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Push for amd64&lt;br&gt;
&lt;code&gt;make pushm1&lt;/code&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>devops</category>
    </item>
    <item>
      <title>1 millions vue leaflet marker ? YES </title>
      <dc:creator>Ayrton</dc:creator>
      <pubDate>Wed, 23 Jun 2021 19:31:27 +0000</pubDate>
      <link>https://forem.com/simerca/1-millions-vue-leaflet-marker-yes-58bm</link>
      <guid>https://forem.com/simerca/1-millions-vue-leaflet-marker-yes-58bm</guid>
      <description>&lt;p&gt;Hi everyone !&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp4x2pppybybe8809r50x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp4x2pppybybe8809r50x.png" alt="1 million markers"&gt;&lt;/a&gt;&lt;br&gt;
1 Million Markers&lt;/p&gt;

&lt;h2&gt;
  
  
  Before read
&lt;/h2&gt;

&lt;p&gt;I have use two scripts for initialize my own Vue components.&lt;br&gt;
Thanks to :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/eJuke/Leaflet.Canvas-Markers" rel="noopener noreferrer"&gt;https://github.com/eJuke/Leaflet.Canvas-Markers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/voluntadpear/vue-choropleth" rel="noopener noreferrer"&gt;https://github.com/voluntadpear/vue-choropleth&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Dependencies
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;vue2-leaflet&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;leaflet&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/@simerca/vue2-leaflet-marker-canvas" rel="noopener noreferrer"&gt;npm package&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm i @simerca/vue2-leaflet-canvas-marker&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Use
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;template&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;LMap&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;LTileLayer&lt;/span&gt; &lt;span class="na"&gt;:url=&lt;/span&gt;&lt;span class="s"&gt;"https://tile.openstreetmap.org/{z}/{x}/{y}.png"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;LCanvasMarker&lt;/span&gt; &lt;span class="na"&gt;:markers=&lt;/span&gt;&lt;span class="s"&gt;"markers"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/LMap&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/template&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;L&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="nx"&gt;leaflet&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;LMap&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;LTileLayer&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;vue2-leaflet&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;LCanvasMarker&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;vue2-leaflet-canvas-marker&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;computed&lt;/span&gt;&lt;span class="p"&gt;:{&lt;/span&gt;
        &lt;span class="nf"&gt;markers&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
            &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;markers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
            &lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
                &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;lat&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;random&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;360&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;180&lt;/span&gt;
                &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;lng&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;random&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;360&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;180&lt;/span&gt;
                &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;icon&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;L&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;icon&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
                    &lt;span class="na"&gt;iconUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;img/marker-icon.png&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="na"&gt;iconSize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
                    &lt;span class="na"&gt;iconAnchor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
                &lt;span class="p"&gt;});&lt;/span&gt;
                &lt;span class="nx"&gt;markers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;L&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;marker&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nx"&gt;lat&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;lng&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;icon&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;icon&lt;/span&gt;&lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nf"&gt;bindPopup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Hello &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;markers&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nl"&gt;components&lt;/span&gt;&lt;span class="p"&gt;:{&lt;/span&gt;
        &lt;span class="nx"&gt;LMap&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;LTileLayer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;LCanvasMarker&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Your welcome !
&lt;/h2&gt;

&lt;p&gt;Star me on github !&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Simerca/vue2-leaflet-canvas-marker" rel="noopener noreferrer"&gt;https://github.com/Simerca/vue2-leaflet-canvas-marker&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vue</category>
      <category>leaflet</category>
      <category>javascript</category>
      <category>awesome</category>
    </item>
    <item>
      <title>Best Amazon EC2 for Docker servers in 7 shell lines</title>
      <dc:creator>Ayrton</dc:creator>
      <pubDate>Sun, 13 Jun 2021 16:39:17 +0000</pubDate>
      <link>https://forem.com/simerca/best-amazon-ec2-for-docker-servers-in-7-shell-lines-6i4</link>
      <guid>https://forem.com/simerca/best-amazon-ec2-for-docker-servers-in-7-shell-lines-6i4</guid>
      <description>&lt;p&gt;Hi &lt;/p&gt;

&lt;p&gt;With the Amazon Linux 2 Centos based instance, here is the best initialisation to start with Docker !&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Forxivjvnoa9iwki8o0e2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Forxivjvnoa9iwki8o0e2.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;yum update &lt;span class="nt"&gt;-y&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;yum &lt;span class="nb"&gt;install &lt;/span&gt;git &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;amazon-linux-extras &lt;span class="nb"&gt;install &lt;/span&gt;docker &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;service docker start
&lt;span class="nb"&gt;sudo &lt;/span&gt;curl &lt;span class="nt"&gt;-L&lt;/span&gt; https://github.com/docker/compose/releases/latest/download/docker-compose-&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;uname&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;-&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;uname&lt;/span&gt; &lt;span class="nt"&gt;-m&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /usr/local/bin/docker-compose
&lt;span class="nb"&gt;sudo ln&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; /usr/local/bin/docker-compose /usr/bin/docker-compose
&lt;span class="nb"&gt;sudo chmod&lt;/span&gt; +x /usr/local/bin/docker-compose&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;docker network create web
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;try &lt;br&gt;
&lt;code&gt;sudo docker run hello-world&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In order:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Update centos repo&lt;/li&gt;
&lt;li&gt;Install Git&lt;/li&gt;
&lt;li&gt;Install Docker&lt;/li&gt;
&lt;li&gt;Start docker&lt;/li&gt;
&lt;li&gt;Download Docker-compose&lt;/li&gt;
&lt;li&gt;relative link for docker-compose&lt;/li&gt;
&lt;li&gt;Docker-compose executable&lt;/li&gt;
&lt;li&gt;Create base network&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Love ❤️ &lt;/p&gt;

</description>
      <category>aws</category>
      <category>docker</category>
      <category>shell</category>
      <category>devops</category>
    </item>
    <item>
      <title>To Cloud or not to Cloud</title>
      <dc:creator>Ayrton</dc:creator>
      <pubDate>Tue, 26 Jan 2021 19:36:22 +0000</pubDate>
      <link>https://forem.com/simerca/to-cloud-or-not-to-cloud-13d2</link>
      <guid>https://forem.com/simerca/to-cloud-or-not-to-cloud-13d2</guid>
      <description>&lt;p&gt;Hi fan of &lt;em&gt;Shakespeare&lt;/em&gt;   !&lt;br&gt;
Thank you for your support on my last blog post:&lt;br&gt;
&lt;a href="https://dev.to/simerca/why-i-moved-my-front-with-nuxtjs-to-wordpress-50p2"&gt;https://dev.to/simerca/why-i-moved-my-front-with-nuxtjs-to-wordpress-50p2&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Last year, I work with the Cloud a major parts of my time.&lt;br&gt;
Aws, Digital Ocean, Azure etc...&lt;/p&gt;

&lt;p&gt;Each time, I realize that the cloud should only be used in one situation, if you need a temporary machine to perform certain tasks. But are overall less economical than its physical competitors, that's for me asking the question:&lt;/p&gt;

&lt;h1&gt;
  
  
  To Cloud or not to Cloud?
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Benefits of the cloud&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Not to be engaged with an instance&lt;/li&gt;
&lt;li&gt;The cost of use (which is also a weak point, we see that later)&lt;/li&gt;
&lt;li&gt;Variable power at will&lt;/li&gt;
&lt;li&gt;The speed of provisioning&lt;/li&gt;
&lt;li&gt;The number of suitable CLI tools&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The Benefits of Physics&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Low cost
???&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Oh wait!&lt;br&gt;
I have no other argument in favor of the physical &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Disadvantage of the cloud&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;At some suppliers, cost surprises&lt;/li&gt;
&lt;li&gt;Technical skills inevitable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Disadvantage from the physical&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Commitment (often monthly)&lt;/li&gt;
&lt;li&gt;Provisioning time&lt;/li&gt;
&lt;li&gt;Redundancy not always "native"&lt;/li&gt;
&lt;li&gt;Instance not really flexible&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So ! &lt;/p&gt;

&lt;p&gt;This does not necessarily mean that the physical is a bad option, moreover in most cases I will advise to go for the physical for your companies. Or if you don't have any linux server skills, you can use SAAS services (Vercel, Heroku, Netlify ... etc)&lt;/p&gt;

&lt;p&gt;If you have arguments to reinforce or counter what I'm saying, don't hesitate to tell me about it in the comments!&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>cloudskills</category>
      <category>devops</category>
    </item>
    <item>
      <title>Why I moved my Front with NuxtJs to Wordpress</title>
      <dc:creator>Ayrton</dc:creator>
      <pubDate>Sat, 23 Jan 2021 21:48:15 +0000</pubDate>
      <link>https://forem.com/simerca/why-i-moved-my-front-with-nuxtjs-to-wordpress-50p2</link>
      <guid>https://forem.com/simerca/why-i-moved-my-front-with-nuxtjs-to-wordpress-50p2</guid>
      <description>&lt;p&gt;Hi everyone !&lt;br&gt;
Thank you for your support on my last blog post:&lt;br&gt;
&lt;a href="https://dev.to/simerca/deploy-postgres-with-replications-database-in-a-minutes-with-terraform-infrastructure-as-code-59ef"&gt;https://dev.to/simerca/deploy-postgres-with-replications-database-in-a-minutes-with-terraform-infrastructure-as-code-59ef&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Yesterday and after many years work with NuxtJS, VueJs, React etc... I moved my website to &lt;em&gt;Wordpress&lt;/em&gt;...&lt;/p&gt;

&lt;h1&gt;
  
  
  WHY ??!! (traitor)
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;Three reasons :&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1 - SEO
&lt;/h2&gt;

&lt;p&gt;I'm developper, not an SEO addict or daily user, I just want the minimum basic for my app should appear to google, but with NuxtJS or VueJS, We should do many configuration to have the best SEO result.&lt;/p&gt;

&lt;p&gt;Wordpress = Install Yoast SEO Plugin and it's done, and automaticly on all your existing/new post/pages&lt;/p&gt;

&lt;h2&gt;
  
  
  2 - Front Builder
&lt;/h2&gt;

&lt;p&gt;I'm backend developper, the front design is not my speciality, and when I want to make beautiful landing page with Nuxt, Vue or React, I need to write all animations, all basic containers etc.etc.. very boring !&lt;/p&gt;

&lt;p&gt;Wordpress = Install Theme + Elementor or Divi Builder and it's done ! With Visual Builder tool ! Great !&lt;/p&gt;

&lt;h2&gt;
  
  
  3 - Async
&lt;/h2&gt;

&lt;p&gt;With NuxtJS, VueJs or React, when you want to show something dynamicly on your page, you need to do somme http calls to your api, (Nuxt has server side rendering but it's same thing to have Php server)&lt;/p&gt;

&lt;p&gt;Wordpress = PHP is server side rendering, no async method to load page, perfect for landing . &lt;/p&gt;

&lt;p&gt;&lt;em&gt;So, I have my Marketing Landing page on&lt;/em&gt;&lt;br&gt;
&lt;code&gt;mydomain.com&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;And my App on&lt;/em&gt;&lt;br&gt;
&lt;code&gt;app.mydomain.com&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Say me if you have more arguments or if you are totally in disagree!&lt;/p&gt;

&lt;p&gt;Love !&lt;/p&gt;

</description>
      <category>nuxt</category>
      <category>wordpress</category>
      <category>vue</category>
      <category>front</category>
    </item>
    <item>
      <title>Deploy Postgres with replications Database in a minutes, with Terraform (Infrastructure as Code)</title>
      <dc:creator>Ayrton</dc:creator>
      <pubDate>Fri, 22 Jan 2021 21:23:27 +0000</pubDate>
      <link>https://forem.com/simerca/deploy-postgres-with-replications-database-in-a-minutes-with-terraform-infrastructure-as-code-59ef</link>
      <guid>https://forem.com/simerca/deploy-postgres-with-replications-database-in-a-minutes-with-terraform-infrastructure-as-code-59ef</guid>
      <description>&lt;p&gt;Hi everyone ! &lt;/p&gt;

&lt;p&gt;So many thanks for your supports in my last blog post:&lt;br&gt;
&lt;a href="https://dev.to/simerca/use-native-gps-with-vuejs-for-ios-and-android-1kk7"&gt;https://dev.to/simerca/use-native-gps-with-vuejs-for-ios-and-android-1kk7&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Today ! It's a great time for you !&lt;/em&gt;&lt;br&gt;
I'will show you how to deploy Postgres database in a minutes with Terraform and AWS, with Primary / Replica and Hourly backup !&lt;/p&gt;

&lt;p&gt;&lt;em&gt;So first, whats is Terraform ?&lt;/em&gt;&lt;br&gt;
Terraform it's a tool for Infrastructure as Code, it's very simple to use it, for exemple, you just write the configuration of you need and execute it with one command like :&lt;br&gt;
&lt;code&gt;terraform apply&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;First install Terraform:&lt;br&gt;
&lt;a href="https://learn.hashicorp.com/tutorials/terraform/install-cli"&gt;https://learn.hashicorp.com/tutorials/terraform/install-cli&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Next, start the configuration files&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;please use my public repo in gitlab:&lt;br&gt;
&lt;code&gt;git clone https://gitlab.com/Simerca/terraform-postgres&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Next, see the first file and edit with your own configuration&lt;br&gt;
&lt;code&gt;variables.tf&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Default AWS Access Credentials&lt;/span&gt;
&lt;span class="nx"&gt;variable&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;access_key&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;****&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;variable&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;secret_key&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;*****&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;variable&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;region&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;eu-west-3&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;variable&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;bucket&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;bucket&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;variable&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;aws_ami&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ami-00798d7180f25aac2&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;variable&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;aws_type&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;t2.micro&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c1"&gt;// Other Configuration&lt;/span&gt;
&lt;span class="nx"&gt;variable&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;workspace&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;variable&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;password&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;*****&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So next see the main file&lt;br&gt;
&lt;code&gt;app-instances.tf&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/* Setup our aws provider */&lt;/span&gt;
&lt;span class="nx"&gt;provider&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;aws&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;access_key&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;${var.access_key}&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="nx"&gt;secret_key&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;${var.secret_key}&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="nx"&gt;region&lt;/span&gt;      &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;${var.region}&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;resource&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;aws_instance&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;primary_1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;ami&lt;/span&gt;           &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;${var.aws_ami}&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="nx"&gt;instance_type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;${var.aws_type}&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="nx"&gt;security_groups&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;${aws_security_group.swarm.name}&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="nx"&gt;key_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;${aws_key_pair.deployer.key_name}&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="nx"&gt;connection&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;host&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;public_ip&lt;/span&gt;
    &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ec2-user&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="nx"&gt;private_key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;${file(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="sr"&gt;/id_rsa.pem"&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="sr"&gt;}&lt;/span&gt;&lt;span class="err"&gt;"
&lt;/span&gt;  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nx"&gt;provisioner&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;remote-exec&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;inline&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo yum update -y&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo yum install git -y&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo amazon-linux-extras install docker -y&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo service docker start&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo chmod +x /usr/local/bin/docker-compose;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo docker network create web&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo docker run --restart=unless-stopped --name=postgres -d -p 5432:5432 -e POSTGRES_DB=${var.workspace} -e POSTGRES_USER=${var.workspace} -e POSTGRES_PASSWORD=${var.password} -v $(pwd)/data:/var/lib/postgresql/data postgres&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo docker run -d --restart=unless-stopped -p 3000:3000 -e PW2_ADHOC_CONN_STR=&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;postgresql://${var.workspace}:${var.password}@${self.public_ip}:5432/${var.workspace}&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt; -e PW2_GRAFANAUSER=admin -e PW2_GRAFANAPASSWORD=admin -e PW2_ADHOC_CONFIG=exhaustive -e PW2_ADHOC_CREATE_HELPERS=true --name pw2 cybertec/pgwatch2-postgres&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo docker run -d --restart=unless-stopped --name=postgres_backup -e SCHEDULE='@hourly' -e S3_REGION=${var.region} -e S3_ACCESS_KEY_ID=${var.access_key} -e S3_SECRET_ACCESS_KEY=${var.secret_key} -e S3_BUCKET=${var.bucket} -e POSTGRES_DATABASE=${var.workspace} -e POSTGRES_USER=${var.workspace} -e POSTGRES_HOST=${self.public_ip} -e POSTGRES_PASSWORD=${var.password} -e S3_PREFIX=${var.workspace} -e POSTGRES_EXTRA_OPTS='--schema=public --blobs' schickling/postgres-backup-s3&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nx"&gt;tags&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
    &lt;span class="nx"&gt;Name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;${var.workspace}-primary&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;resource&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;aws_instance&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;replica_1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;ami&lt;/span&gt;           &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ami-00798d7180f25aac2&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="nx"&gt;instance_type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;${var.aws_type}&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="nx"&gt;security_groups&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;${aws_security_group.swarm.name}&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="nx"&gt;key_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;${aws_key_pair.deployer.key_name}&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="nx"&gt;connection&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;host&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;public_ip&lt;/span&gt;
    &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ec2-user&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="nx"&gt;private_key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;${file(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="sr"&gt;/id_rsa.pem"&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="sr"&gt;}&lt;/span&gt;&lt;span class="err"&gt;"
&lt;/span&gt;  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nx"&gt;provisioner&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;remote-exec&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;inline&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo yum update -y&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo yum install git -y&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo amazon-linux-extras install docker -y&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo service docker start&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo chmod +x /usr/local/bin/docker-compose;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo docker network create web&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo docker run --restart=unless-stopped --name=postgres -d -p 5432:5432 -e POSTGRES_DB=${var.workspace} -e POSTGRES_USER=${var.workspace} -e POSTGRES_PASSWORD=${var.password} -v $(pwd)/data:/var/lib/postgresql/data postgres&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo docker run -d --restart=unless-stopped -p 3000:3000 -e PW2_ADHOC_CONN_STR=&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;postgresql://${var.workspace}:${var.password}@${self.public_ip}:5432/${var.workspace}&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt; -e PW2_GRAFANAUSER=admin -e PW2_GRAFANAPASSWORD=admin -e PW2_ADHOC_CONFIG=exhaustive -e PW2_ADHOC_CREATE_HELPERS=true --name pw2 cybertec/pgwatch2-postgres&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo docker run -d --restart=unless-stopped --name=postgres_backup -e SCHEDULE='@hourly' -e S3_REGION=${var.region} -e S3_ACCESS_KEY_ID=${var.access_key} -e S3_SECRET_ACCESS_KEY=${var.secret_key} -e S3_BUCKET=${var.bucket} -e POSTGRES_DATABASE=${var.workspace} -e POSTGRES_USER=${var.workspace} -e POSTGRES_HOST=${self.public_ip} -e POSTGRES_PASSWORD=${var.password} -e S3_PREFIX=${var.workspace} -e POSTGRES_EXTRA_OPTS='--schema=public --blobs' schickling/postgres-restore-s3&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nx"&gt;tags&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
    &lt;span class="nx"&gt;Name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;${var.workspace}-replica&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So ! Try to understand how it works&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 1 :
&lt;/h1&gt;

&lt;p&gt;Use the variable to set the configuration, very simple to do this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;provider&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;aws&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;access_key&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;${var.access_key}&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="nx"&gt;secret_key&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;${var.secret_key}&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="nx"&gt;region&lt;/span&gt;      &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;${var.region}&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can use environment variable with the schema :&lt;/p&gt;

&lt;p&gt;&lt;code&gt;TF_VAR_access_key=XXXXXX terraform apply&lt;/code&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 2:
&lt;/h1&gt;

&lt;p&gt;Launch instance and basic configuration with set of command lines&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;resource&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;aws_instance&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;primary_1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;ami&lt;/span&gt;           &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;${var.aws_ami}&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="nx"&gt;instance_type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;${var.aws_type}&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="nx"&gt;security_groups&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;${aws_security_group.swarm.name}&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="nx"&gt;key_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;${aws_key_pair.deployer.key_name}&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="nx"&gt;connection&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;host&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;public_ip&lt;/span&gt;
    &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ec2-user&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="nx"&gt;private_key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;${file(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="sr"&gt;/id_rsa.pem"&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="sr"&gt;}&lt;/span&gt;&lt;span class="err"&gt;"
&lt;/span&gt;  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nx"&gt;provisioner&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;remote-exec&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;inline&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo yum update -y&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo yum install git -y&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo amazon-linux-extras install docker -y&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo service docker start&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo chmod +x /usr/local/bin/docker-compose;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo docker network create web&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo docker run --restart=unless-stopped --name=postgres -d -p 5432:5432 -e POSTGRES_DB=${var.workspace} -e POSTGRES_USER=${var.workspace} -e POSTGRES_PASSWORD=${var.password} -v $(pwd)/data:/var/lib/postgresql/data postgres&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo docker run -d --restart=unless-stopped -p 3000:3000 -e PW2_ADHOC_CONN_STR=&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;postgresql://${var.workspace}:${var.password}@${self.public_ip}:5432/${var.workspace}&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt; -e PW2_GRAFANAUSER=admin -e PW2_GRAFANAPASSWORD=admin -e PW2_ADHOC_CONFIG=exhaustive -e PW2_ADHOC_CREATE_HELPERS=true --name pw2 cybertec/pgwatch2-postgres&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sudo docker run -d --restart=unless-stopped --name=postgres_backup -e SCHEDULE='@hourly' -e S3_REGION=${var.region} -e S3_ACCESS_KEY_ID=${var.access_key} -e S3_SECRET_ACCESS_KEY=${var.secret_key} -e S3_BUCKET=${var.bucket} -e POSTGRES_DATABASE=${var.workspace} -e POSTGRES_USER=${var.workspace} -e POSTGRES_HOST=${self.public_ip} -e POSTGRES_PASSWORD=${var.password} -e S3_PREFIX=${var.workspace} -e POSTGRES_EXTRA_OPTS='--schema=public --blobs' schickling/postgres-backup-s3&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nx"&gt;tags&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
    &lt;span class="nx"&gt;Name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;${var.workspace}-primary&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Be carreful to this line&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;private_key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;${file(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="sr"&gt;/id_rsa.pem"&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="sr"&gt;}&lt;/span&gt;&lt;span class="err"&gt;"
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Yoo need to create new SSL key for access to your instances&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ssh-keygen -t rsa -N "" -b 2048 -C "assignment"&lt;/code&gt;&lt;br&gt;
&lt;code&gt;ssh-keygen -y -f ~/.ssh/id_rsa.pem &amp;gt; ~/.ssh/id_rsa.pub&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;After,&lt;br&gt;
The command line execute command in order.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install dependencies&lt;/li&gt;
&lt;li&gt;Install docker&lt;/li&gt;
&lt;li&gt;Docker run some containers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We run this set twice, 1 primary, 1 replica (master/slave)&lt;/p&gt;
&lt;h1&gt;
  
  
  Step 3
&lt;/h1&gt;

&lt;p&gt;Open security group&lt;/p&gt;

&lt;p&gt;In other file we have :&lt;br&gt;
&lt;code&gt;security-group.tf&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/* Default security group */&lt;/span&gt;
&lt;span class="nx"&gt;resource&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;aws_security_group&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;swarm&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;swarm-group-${var.workspace}&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="nx"&gt;description&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Default security group that allows inbound and outbound traffic from all instances in the VPC&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;

  &lt;span class="nx"&gt;ingress&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;from_port&lt;/span&gt;   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="nx"&gt;to_port&lt;/span&gt;     &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="nx"&gt;protocol&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;-1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="nx"&gt;cidr_blocks&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;0.0.0.0/0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="nb"&gt;self&lt;/span&gt;        &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;ingress&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;from_port&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;22&lt;/span&gt;
    &lt;span class="nx"&gt;to_port&lt;/span&gt;   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;22&lt;/span&gt;
    &lt;span class="nx"&gt;protocol&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;tcp&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="nx"&gt;cidr_blocks&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;0.0.0.0/0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;ingress&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;from_port&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5432&lt;/span&gt;
    &lt;span class="nx"&gt;to_port&lt;/span&gt;   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5432&lt;/span&gt;
    &lt;span class="nx"&gt;protocol&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;tcp&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="nx"&gt;cidr_blocks&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;0.0.0.0/0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;....&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here we open the needed port to access on our Postgres&lt;/p&gt;

&lt;h1&gt;
  
  
  Lets Try !
&lt;/h1&gt;

&lt;p&gt;First try your configuration (it's just a test)&lt;br&gt;
&lt;code&gt;terraform plan&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Next, you can use this exemple command line to launch Postgres instance inside your AWS account :&lt;/p&gt;

&lt;p&gt;&lt;code&gt;TF_VAR_access_key=XXXX TF_VAR_secret_key=XXXX TF_VAR_user=DBUser TF_VAR_password=SomePassword terraform apply&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This command launch:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;2 Ec2 instances (Primary /Replica)&lt;/li&gt;
&lt;li&gt;2 PostgresSQL Database on port 5432 and with the user : DBUser and password : SomePassword&lt;/li&gt;
&lt;li&gt;2 Monitoring container with Grafana&lt;/li&gt;
&lt;li&gt;2 Hourly backup on S3 Bucket(Primary to Replica)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;and when you want to destroy all instances&lt;/p&gt;

&lt;p&gt;&lt;code&gt;terraform destroy&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;very simple no ?&lt;/p&gt;

&lt;h1&gt;
  
  
  Some pub ?
&lt;/h1&gt;

&lt;p&gt;If you don't want to use your mind, you can try my deployment tool, to deploy Postgres with replications and Monitoring in a minutes&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cloudgres.com"&gt;https://cloudgres.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Dont forget to talk with me !&lt;/p&gt;

&lt;p&gt;Thanks for your time! &lt;/p&gt;

</description>
      <category>aws</category>
      <category>terraform</category>
      <category>postgres</category>
      <category>cloudskills</category>
    </item>
    <item>
      <title>Use Native GPS With VueJS for iOS and Android</title>
      <dc:creator>Ayrton</dc:creator>
      <pubDate>Wed, 07 Oct 2020 18:34:37 +0000</pubDate>
      <link>https://forem.com/simerca/use-native-gps-with-vuejs-for-ios-and-android-1kk7</link>
      <guid>https://forem.com/simerca/use-native-gps-with-vuejs-for-ios-and-android-1kk7</guid>
      <description>&lt;p&gt;Hi people who want to conquer the planet! &lt;em&gt;Human btw&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Today I show you how to use &lt;strong&gt;GPS&lt;/strong&gt; inside your &lt;strong&gt;VueJS&lt;/strong&gt; app of destination to &lt;strong&gt;Android&lt;/strong&gt; or &lt;strong&gt;iOS&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If you can’t understand how &lt;strong&gt;VueJS&lt;/strong&gt; can be integrated inside mobile app take a view on my last post !&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/simerca/mobile-ios-android-app-with-vuejs-in-5-minutes-really-52n5"&gt;Mobile App in 5 minutes with VueJS&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Did you know Capacitor ?
&lt;/h2&gt;

&lt;p&gt;Capacitor is a library from develop by &lt;strong&gt;Ionic&lt;/strong&gt; and It make a join with &lt;strong&gt;JavaScript&lt;/strong&gt; code and &lt;strong&gt;Native Mobile&lt;/strong&gt; functions.&lt;/p&gt;

&lt;p&gt;Today we speak about the GPS but Capacitor have lots of functionality take a look here&lt;/p&gt;

&lt;p&gt;&lt;a href="https://capacitorjs.com/docs/getting-started"&gt;https://capacitorjs.com/docs/getting-started&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first thing is to init capacitor inside your project application&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; @capacitor/core @capacitor/cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx cap init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Dont forget to change build dir inside the &lt;code&gt;capacitor.config.js&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOW&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Inside your application when you want get GeoLocation from user,&lt;br&gt;
You do use&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Plugins&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@capacitor/core&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Geolocation&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Plugins&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="na"&gt;methods&lt;/span&gt;&lt;span class="p"&gt;:{&lt;/span&gt;
  &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nx"&gt;getCurrentPosition&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;coordinates&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;Geolocation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getCurrentPosition&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Current&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;coordinates&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="nx"&gt;watchPosition&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;wait&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Geolocation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;watchPosition&lt;/span&gt;&lt;span class="p"&gt;({},&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;position&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you can look on variable &lt;code&gt;coordinates&lt;/code&gt;, has you can see is there an object like&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
speed:0, // on km/h
latitude:x,
longitude:x,
accurate:x // on metters
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's directly work on you browser and you can build it with Capacitor into a Mobile App.&lt;/p&gt;

&lt;p&gt;You can enable high accurency with this option&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;enableHighAccuracy: true;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;exemple&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;wait&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Geolocation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;watchPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="na"&gt;enableHighAccuracy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;position&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; 
&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;error&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Very easy to use in your application !&lt;/p&gt;

</description>
      <category>ios</category>
      <category>android</category>
      <category>gps</category>
      <category>vue</category>
    </item>
  </channel>
</rss>
