<?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: Thomas Epelbaum</title>
    <description>The latest articles on Forem by Thomas Epelbaum (@tepelbaum).</description>
    <link>https://forem.com/tepelbaum</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%2F1324143%2Fd0621164-a067-423f-8df4-c648a7f67d49.png</url>
      <title>Forem: Thomas Epelbaum</title>
      <link>https://forem.com/tepelbaum</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/tepelbaum"/>
    <language>en</language>
    <item>
      <title>EcoAct releases ecodev-app!</title>
      <dc:creator>Thomas Epelbaum</dc:creator>
      <pubDate>Tue, 03 Sep 2024 10:31:49 +0000</pubDate>
      <link>https://forem.com/tepelbaum/ecoact-releases-ecodev-app-18ai</link>
      <guid>https://forem.com/tepelbaum/ecoact-releases-ecodev-app-18ai</guid>
      <description>&lt;p&gt;In line with its recent contributions to the Open Source world, EcoAct is making its &lt;a href="https://github.com/SE-Sustainability-OSS/ecodev-app" rel="noopener noreferrer"&gt;ecodev-app&lt;/a&gt; (and its associated &lt;a href="https://ecodev-doc.lcabox.com/" rel="noopener noreferrer"&gt;documentation&lt;/a&gt; available to all developers wishing to create complete and secure web applications in Python. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/SE-Sustainability-OSS/ecodev-app" rel="noopener noreferrer"&gt;Ecodev-app&lt;/a&gt; is the culmination of over a year's work by &lt;a href="https://mcas-proxyweb.mcas.ms/certificate-checker?login=false&amp;amp;originalUrl=https%3A%2F%2Fwww.linkedin.com.mcas.ms%2Fin%2Fthomas-epelbaum-64b09625%2F%3FMcasTsid%3D15600&amp;amp;McasCSRF=35cc8fd9310088b80ce90c55ec868930edb1b46ad86afccccaba7b3d1e3becda&amp;amp;McasTsid=15600" rel="noopener noreferrer"&gt;Thomas Epelbaum&lt;/a&gt;, &lt;a href="https://mcas-proxyweb.mcas.ms/certificate-checker?login=false&amp;amp;originalUrl=https%3A%2F%2Fwww.linkedin.com.mcas.ms%2Fin%2Foliviergabriel%2F%3ForiginalSubdomain%3Dfr%26McasTsid%3D15600&amp;amp;McasCSRF=35cc8fd9310088b80ce90c55ec868930edb1b46ad86afccccaba7b3d1e3becda&amp;amp;McasTsid=15600" rel="noopener noreferrer"&gt;Olivier Gabriel&lt;/a&gt;, &lt;a href="https://mcas-proxyweb.mcas.ms/certificate-checker?login=false&amp;amp;originalUrl=https%3A%2F%2Fwww.linkedin.com.mcas.ms%2Fin%2Famaury-salles-0b0164a0%2F%3ForiginalSubdomain%3Dfr%26McasTsid%3D15600&amp;amp;McasCSRF=35cc8fd9310088b80ce90c55ec868930edb1b46ad86afccccaba7b3d1e3becda&amp;amp;McasTsid=15600" rel="noopener noreferrer"&gt;Amaury Salles&lt;/a&gt;, &lt;a href="https://mcas-proxyweb.mcas.ms/certificate-checker?login=false&amp;amp;originalUrl=https%3A%2F%2Fwww.linkedin.com.mcas.ms%2Fin%2Fyoanndiep%2Foverlay%2Fphoto%2F%3FMcasTsid%3D15600&amp;amp;McasCSRF=35cc8fd9310088b80ce90c55ec868930edb1b46ad86afccccaba7b3d1e3becda&amp;amp;McasTsid=15600" rel="noopener noreferrer"&gt;Yoann Diep&lt;/a&gt;, &lt;a href="https://mcas-proxyweb.mcas.ms/certificate-checker?login=false&amp;amp;originalUrl=https%3A%2F%2Fwww.linkedin.com.mcas.ms%2Fin%2Fdoriankodelja%2F%3ForiginalSubdomain%3Dfr%26McasTsid%3D15600&amp;amp;McasCSRF=35cc8fd9310088b80ce90c55ec868930edb1b46ad86afccccaba7b3d1e3becda&amp;amp;McasTsid=15600" rel="noopener noreferrer"&gt;Dorian Kodelja&lt;/a&gt; and &lt;a href="https://mcas-proxyweb.mcas.ms/certificate-checker?login=false&amp;amp;originalUrl=https%3A%2F%2Fuk.linkedin.com.mcas.ms%2Fin%2Fjaphethyates%3FMcasTsid%3D15600&amp;amp;McasCSRF=35cc8fd9310088b80ce90c55ec868930edb1b46ad86afccccaba7b3d1e3becda&amp;amp;McasTsid=15600" rel="noopener noreferrer"&gt;Japheth Yates&lt;/a&gt;  (all members of EcoAct's &lt;a href="https://mcas-proxyweb.mcas.ms/certificate-checker?login=false&amp;amp;originalUrl=https%3A%2F%2Feco-act.com.mcas.ms%2Ffr%2Fblog%2Fequipe-climate-data-analytics%2F%3FMcasTsid%3D15600&amp;amp;McasCSRF=35cc8fd9310088b80ce90c55ec868930edb1b46ad86afccccaba7b3d1e3becda&amp;amp;McasTsid=15600" rel="noopener noreferrer"&gt;Climate Data Analytics&lt;/a&gt; (CDA) team) to facilitate the development of websites in Python from scratch.  &lt;/p&gt;

&lt;p&gt;As explained in our &lt;a href="https://mcas-proxyweb.mcas.ms/certificate-checker?login=false&amp;amp;originalUrl=https%3A%2F%2Feco-act.com.mcas.ms%2Ffr%2Fblog%2Fclimate-data-analytics-librairie-open-source%2F%3FMcasTsid%3D15600&amp;amp;McasCSRF=35cc8fd9310088b80ce90c55ec868930edb1b46ad86afccccaba7b3d1e3becda&amp;amp;McasTsid=15600" rel="noopener noreferrer"&gt;previous publication on open source&lt;/a&gt;, developers perpetually build on the volunteer work of their generous predecessors. The various missions undertaken by CDA would never have seen the light of day without various tools to manage &lt;a href="https://mcas-proxyweb.mcas.ms/certificate-checker?login=false&amp;amp;originalUrl=https%3A%2F%2Fdash.plotly.com.mcas.ms%2F%3FMcasTsid%3D15600&amp;amp;McasCSRF=35cc8fd9310088b80ce90c55ec868930edb1b46ad86afccccaba7b3d1e3becda&amp;amp;McasTsid=15600" rel="noopener noreferrer"&gt;site creation&lt;/a&gt;, &lt;a href="https://mcas-proxyweb.mcas.ms/certificate-checker?login=false&amp;amp;originalUrl=https%3A%2F%2Ffastapi.tiangolo.com.mcas.ms%2F%3FMcasTsid%3D15600&amp;amp;McasCSRF=35cc8fd9310088b80ce90c55ec868930edb1b46ad86afccccaba7b3d1e3becda&amp;amp;McasTsid=15600" rel="noopener noreferrer"&gt;interaction&lt;/a&gt; with a backend engine, and &lt;a href="https://mcas-proxyweb.mcas.ms/certificate-checker?login=false&amp;amp;originalUrl=https%3A%2F%2Fsqlmodel.tiangolo.com.mcas.ms%2F%3FMcasTsid%3D15600&amp;amp;McasCSRF=35cc8fd9310088b80ce90c55ec868930edb1b46ad86afccccaba7b3d1e3becda&amp;amp;McasTsid=15600" rel="noopener noreferrer"&gt;database&lt;/a&gt; creation. &lt;/p&gt;

&lt;p&gt;CDA decided to add its contribution to this open source environment, in line with EcoAct's values of sharing. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/SE-Sustainability-OSS/ecodev-app" rel="noopener noreferrer"&gt;Ecodev-app&lt;/a&gt; benefits from all the previous work already carried out and shared by CDA in 2024: a technical library for &lt;a href="https://mcas-proxyweb.mcas.ms/certificate-checker?login=false&amp;amp;originalUrl=https%3A%2F%2Fgithub.com.mcas.ms%2FSE-Sustainability-OSS%2Fecodev-core%3FMcasTsid%3D15600&amp;amp;McasCSRF=35cc8fd9310088b80ce90c55ec868930edb1b46ad86afccccaba7b3d1e3becda&amp;amp;McasTsid=15600" rel="noopener noreferrer"&gt;backend tasks&lt;/a&gt; (the hidden part of a website, its engine), a library for &lt;a href="https://github.com/SE-Sustainability-OSS/ecodev-cloud" rel="noopener noreferrer"&gt;reading and writing files stored in the cloud&lt;/a&gt;, a library for &lt;a href="https://mcas-proxyweb.mcas.ms/certificate-checker?login=false&amp;amp;originalUrl=https%3A%2F%2Fgithub.com.mcas.ms%2FSE-Sustainability-OSS%2Fecodev-infra%22%20HYPERLINK%20%22https%3A%2F%2Fgithub.com%2FSE-Sustainability-OSS%2Fecodev-infra%3FMcasTsid%3D15600&amp;amp;McasCSRF=35cc8fd9310088b80ce90c55ec868930edb1b46ad86afccccaba7b3d1e3becda&amp;amp;McasTsid=15600" rel="noopener noreferrer"&gt;turning your code into a secure web site deployed on the Internet&lt;/a&gt; and a library of &lt;a href="https://mcas-proxyweb.mcas.ms/certificate-checker?login=false&amp;amp;originalUrl=https%3A%2F%2Fgithub.com.mcas.ms%2FSE-Sustainability-OSS%2Fecodev-front%3FMcasTsid%3D15600&amp;amp;McasCSRF=35cc8fd9310088b80ce90c55ec868930edb1b46ad86afccccaba7b3d1e3becda&amp;amp;McasTsid=15600" rel="noopener noreferrer"&gt;graphic components for websites&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Thanks to &lt;a href="https://github.com/SE-Sustainability-OSS/ecodev-app" rel="noopener noreferrer"&gt;Ecodev-app&lt;/a&gt; and its ecosystem, CDA has been able to develop over thirty applications in a very short space of time.  &lt;/p&gt;

&lt;p&gt;We hope that all Python developers will be able to benefit from this work and create modern, secure websites in record time. Feel free to reuse, copy, and even contribute! &lt;/p&gt;

&lt;p&gt;CDA's ambition is to continue contributing to the open source universe in the future, whether through the publication of scientific articles, white papers or other open source libraries. We might also produce a video detailing the setup from scratch of &lt;a href="https://github.com/SE-Sustainability-OSS/ecodev-app" rel="noopener noreferrer"&gt;Ecodev-app&lt;/a&gt; if enough people show interest. &lt;/p&gt;

&lt;p&gt;To find out more, don't hesitate to send your questions to Thomas Epelbaum, Head of python development and Machine Learning, CDA, via &lt;a href="https://mcas-proxyweb.mcas.ms/certificate-checker?login=false&amp;amp;originalUrl=https%3A%2F%2Feco-act.com.mcas.ms%2Ffr%2Fcontact%3FMcasTsid%3D15600&amp;amp;McasCSRF=35cc8fd9310088b80ce90c55ec868930edb1b46ad86afccccaba7b3d1e3becda&amp;amp;McasTsid=15600" rel="noopener noreferrer"&gt;this form&lt;/a&gt;. &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>fastapi</category>
      <category>docker</category>
      <category>plotlydash</category>
    </item>
    <item>
      <title>EcoAct has released it's third open source library!</title>
      <dc:creator>Thomas Epelbaum</dc:creator>
      <pubDate>Tue, 28 May 2024 16:00:01 +0000</pubDate>
      <link>https://forem.com/tepelbaum/ecoact-has-released-its-third-open-source-library-2f6h</link>
      <guid>https://forem.com/tepelbaum/ecoact-has-released-its-third-open-source-library-2f6h</guid>
      <description>&lt;p&gt;If you've ever had to handle a large volume of data, chances are that you've had to interact with &lt;a href="https://boto3.amazonaws.com/v1/documentation/api/latest/index.html"&gt;boto3&lt;/a&gt; / &lt;a href="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob"&gt;azure.storage.blob&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Did you love the experience? We didn't totally either. We needed some high-level functions that could be relied on to work 98% of the time, and that allowed us to be agnostic in terms of which cloud provider/object storage protocol we're working on.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/FR-PAR-ECOACT/ecodev-cloud"&gt;ecodev-cloud&lt;/a&gt; (and it's associated &lt;a href="https://ecodev-doc.lcabox.com/libraries/cloud/"&gt;documentation&lt;/a&gt;) does just that, with some (relatively... 😊) cloud-agnostic load/save/search/copy/move methods. &lt;/p&gt;

&lt;p&gt;By setting some env variables and adding &lt;a href="https://github.com/FR-PAR-ECOACT/ecodev-cloud"&gt;ecodev-cloud&lt;/a&gt; to your usual requirements, it should be easier to interact with cloud storages (this was the case for us, and we surely hope that it will be the case for you too!). &lt;/p&gt;

&lt;p&gt;In any case, do not hesitate to take what you need, read the code, learn from what we did (and share your own insights, we would be delighted )...&lt;/p&gt;

&lt;p&gt;The local dev setup relying on minio and/or azurite might prove useful to you as well (we found very few relevant information on azurite).&lt;/p&gt;

&lt;p&gt;Special thanks to Olivier Gabriel , Amaury Salles , Yoann Diep , Dorian KODELJA and Japheth Yates for the support!&lt;/p&gt;

&lt;p&gt;Happy coding from the EcoAct CDA Python team! 😊 &lt;/p&gt;

</description>
      <category>python</category>
      <category>s3</category>
      <category>blob</category>
    </item>
    <item>
      <title>How to quickly setup an infra [Part 1]</title>
      <dc:creator>Thomas Epelbaum</dc:creator>
      <pubDate>Wed, 20 Mar 2024 17:37:05 +0000</pubDate>
      <link>https://forem.com/tepelbaum/how-to-quickly-setup-an-infra-part-1-14pm</link>
      <guid>https://forem.com/tepelbaum/how-to-quickly-setup-an-infra-part-1-14pm</guid>
      <description>&lt;p&gt;This is the first part of a serie where I would like to present a simple way to setup an infra for either&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;an ambitious personal project&lt;/li&gt;
&lt;li&gt;a small SME/a startup in it's infancy. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why this serie?
&lt;/h2&gt;

&lt;p&gt;Good question! 😁 You could go with the heroku-like approach, or the hyperscaler one. I am sure there are tons of other tutorials out there to help you do so. &lt;/p&gt;

&lt;p&gt;But the approach that I am going to present is ultra cheap (only 1 VM needed) and has some pedagogical merits 😊.&lt;/p&gt;

&lt;p&gt;Plus in an era where &lt;a href="https://www.infoworld.com/article/3712861/why-companies-are-leaving-the-cloud.html"&gt;companies&lt;/a&gt; are more and more &lt;a href="https://world.hey.com/dhh/why-we-re-leaving-the-cloud-654b47e0"&gt;moving away from the cloud&lt;/a&gt;, you never know, it might proves useful 😋.&lt;/p&gt;

&lt;h2&gt;
  
  
   What are we aiming at?
&lt;/h2&gt;

&lt;p&gt;By the end of this serie, you should have a stack looking like so&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Forhxgwsrwu6rn8yktsf7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Forhxgwsrwu6rn8yktsf7.png" alt="What this serie is aiming at: self-managed infra for small SME/startup" width="800" height="464"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This stack includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://doc.traefik.io/traefik/"&gt;Traefik&lt;/a&gt; as a &lt;a href="https://en.wikipedia.org/wiki/Reverse_proxy"&gt;reverse proxy&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; &lt;a href="https://www.postgresql.org/"&gt;PostgreSQL&lt;/a&gt; as a sql db and &lt;a href="https://www.pgadmin.org/"&gt;pgAdmin&lt;/a&gt; as its admin interface&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.bookstackapp.com/"&gt;Bookstack&lt;/a&gt; and its associated db for documenting your product&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.keycloak.org/"&gt;keycloak&lt;/a&gt; and  &lt;a href="https://doc.traefik.io/traefik/middlewares/http/forwardauth/"&gt;traefik forward-auth&lt;/a&gt;    to protect apps that cannot implement authentication without keycloak&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://min.io/"&gt;minio&lt;/a&gt; back and front to stored/exchange data&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/mcuadros/ofelia"&gt;Ofelia&lt;/a&gt; as a job scheduler&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/pypiserver/pypiserver"&gt;Private pypi&lt;/a&gt; to store your precious private python libraries between collegues.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dozzle.dev/"&gt;dozzle&lt;/a&gt; for log aggregation&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/louislam/uptime-kuma"&gt;uptime-kuma&lt;/a&gt; for monitoring and alerting&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'll talk (python) web app setup in another subsequent serie 😊.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to start?
&lt;/h2&gt;

&lt;p&gt;Well, thanks to the work we did at &lt;a href="https://eco-act.com/"&gt;EcoAct&lt;/a&gt;, we got you covered:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This &lt;a href="https://ecodev-doc.lcabox.com/cookiecutters/infra/"&gt;documentation&lt;/a&gt; page and the ones related are the content I am going to present in this serie. This post corresponds to &lt;a href="https://ecodev-doc.lcabox.com/cookiecutters/infra/setup/setup_ubuntu_vm/"&gt;this page&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The associated code can be found in &lt;a href="https://github.com/FR-PAR-ECOACT/ecodev-infra"&gt;this&lt;/a&gt; open source (MIT licence) repo.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What are we going to learn today?
&lt;/h2&gt;

&lt;p&gt;Setting up a VM with one simple script! Yes I know, it surely could be done with &lt;a href="https://www.ansible.com/"&gt;ansible&lt;/a&gt;, but fur such a simple use case it seems overkill (plus one has to install ansible before being able to use it, by contrast with bash 😂).&lt;/p&gt;

&lt;p&gt;TL DR: clone the repo, launch the setup script. The end! 😂 Now the details.&lt;/p&gt;

&lt;h2&gt;
  
  
  Actual setup
&lt;/h2&gt;

&lt;p&gt;There are countless blog posts to help you decide which cloud provider is the best for you, and I won't add to this literature here 😊. &lt;/p&gt;

&lt;p&gt;I therefore just assume you have a Virtual Machine (VM) Cloud setup with ssh access. &lt;/p&gt;

&lt;p&gt;Here I provide a simple &lt;a href="https://www.freecodecamp.org/news/bash-scripting-tutorial-linux-shell-script-and-command-line-for-beginners/"&gt;bash script&lt;/a&gt; to setup a freshly bought VM, assuming an &lt;a href="https://ubuntu.com/"&gt;Ubuntu&lt;/a&gt; Operating System (this OS choice is important for the firewall setup).&lt;/p&gt;

&lt;h3&gt;
  
  
  Launching the setup script
&lt;/h3&gt;

&lt;p&gt;After having accessed with ssh to your VM, just &lt;code&gt;git clone&lt;/code&gt; &lt;a href="https://github.com/FR-PAR-ECOACT/ecodev-infra"&gt;ecodev-infra&lt;/a&gt;. Then in the main folder, launch&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;make setup-vm &amp;lt;YOURUSER&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Where &lt;code&gt;&amp;lt;YOURUSER&amp;gt;&lt;/code&gt; is the username you used for connecting to the VM. The bash script executed will&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install docker and related components&lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;&amp;lt;YOURUSER&amp;gt;&lt;/code&gt; to the &lt;code&gt;sudo&lt;/code&gt; and &lt;code&gt;docker&lt;/code&gt; group of the VM (might need to disconnect and reconnect &lt;strong&gt;at the end of the setup&lt;/strong&gt; for this to take effect) &lt;/li&gt;
&lt;li&gt;Setup &lt;a href="https://doc.ubuntu.org/ufw"&gt;ufw&lt;/a&gt; (uncomplicated firewall) to work with docker (more on that below) &lt;/li&gt;
&lt;li&gt;block all but 22, 80 (tcp only) and 443 (tcp only) ports.&lt;/li&gt;
&lt;li&gt;Setup a decent &lt;code&gt;history&lt;/code&gt; (&lt;a href="https://www.digitalocean.com/community/tutorials/how-to-use-bash-history-commands-and-expansions-on-a-linux-vps"&gt;english resource on the topic&lt;/a&gt;) memory size.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🚨 &lt;strong&gt;Technical topic incoming&lt;/strong&gt; 🚨
&lt;/h3&gt;

&lt;p&gt;Why going into all this trouble with ufw?&lt;/p&gt;

&lt;p&gt;As explained &lt;a href="https://www.baeldung.com/linux/docker-container-published-port-ignoring-ufw-rules"&gt;here&lt;/a&gt; way better than I could, the standard &lt;strong&gt;ufw setup won't forbid access to docker exposed ports on your VM, even ports explicitely blocked with an ufw rule!!&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This has to do with technicalities related to  &lt;a href="https://help.ubuntu.com/community/IptablesHowTo"&gt;iptables&lt;/a&gt;  explained in the linked posts. &lt;/p&gt;

&lt;p&gt;To make ufw work with docker, one &lt;strong&gt;has&lt;/strong&gt; to use this (awesome!) &lt;a href="https://github.com/chaifeng/ufw-docker"&gt;solution&lt;/a&gt;. This is the reason of the &lt;code&gt;sudo cp after.rules /etc/ufw/after.rules&lt;/code&gt; line in the &lt;code&gt;setup.sh&lt;/code&gt; script.&lt;/p&gt;

&lt;p&gt;You might be as curious as I was and wondering why there is no Open Source docker container responsible for dealing with firewall issues. &lt;/p&gt;

&lt;p&gt;To the best of my knowledge, this has to do with the fact that firewell related stuff is really low level and needs to live close to the VM kernel. &lt;a href="https://www.reddit.com/r/docker/comments/cmuxcs/how_do_i_deploy_a_firewall_in_a_container/"&gt;One example&lt;/a&gt; out of the numerous conversations on the topic. &lt;/p&gt;

&lt;h3&gt;
  
  
  The script in its whole splendor
&lt;/h3&gt;

&lt;p&gt;If you're too curious 😋 to wait to go inspect the &lt;a href="https://github.com/FR-PAR-ECOACT/ecodev-infra"&gt;EcoAct infra repo&lt;/a&gt; (though I still highly encourage you to do so), here is the srcipt&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash

# This is a VM setup for ubuntu only OS
# Provide as argument your username (in order to add you to docker and sudo group)

echo "Installing docker"
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg make
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo   "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
       "$(. /etc/os-release &amp;amp;&amp;amp; echo "$VERSION_CODENAME")" stable" |   sudo tee /etc/apt/sources.list.d/docker.list &amp;gt; /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

echo "Add access rights for current user" $1
sudo usermod -a -G docker $1
sudo usermod -a -G sudo  $1

echo "Setting up ufw to be docker compatible"
sudo ufw enable

echo "Edit ufw rules to be docker compatible"
# ref: https://github.com/chaifeng/ufw-docker?tab=readme-ov-file#solving-ufw-and-docker-issues
sudo cp after.rules /etc/ufw/after.rules

sudo ufw reload
echo "Setup ufw: block all but 22, 80 (tcp only) and 443 (tcp only) ports"
sudo ufw default deny
sudo ufw allow 22
sudo ufw route allow proto tcp from any to any port 80
sudo ufw route allow proto tcp from any to any port 443
echo "Turning ufw log"
# ufw is known to be glutton in terms of memory
sudo ufw logging off

echo "Restarting docker"

sudo systemctl restart docker

echo "Setup decent history size"

echo "export HISTSIZE=100000" &amp;gt;&amp;gt; .bashrc
echo "export HISTFILESIZE=100000" &amp;gt;&amp;gt; .bashrc
echo "export HISTCONTROL=ignoreboth:erasedups" &amp;gt;&amp;gt; .bashrc

echo "All done!"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  I like what I read!
&lt;/h2&gt;

&lt;p&gt;That's awesome! If you want to encourage me to continue the serie, do not hesitate to ⭐ &lt;a href="https://github.com/FR-PAR-ECOACT/ecodev-infra"&gt;ecodev-infra&lt;/a&gt;, best way to aknowledge the hard work we put at &lt;a href="https://eco-act.com/"&gt;EcoAct&lt;/a&gt; to create this repo. &lt;/p&gt;

&lt;h2&gt;
  
  
  What's the (hopefully no so the distant) future?
&lt;/h2&gt;

&lt;p&gt;We would like to do a full pythonic equivalent of &lt;a href="https://github.com/tiangolo/full-stack-fastapi-template"&gt;Tiangolo's work&lt;/a&gt;. Of course Tiangolo repo is &lt;strong&gt;the&lt;/strong&gt; place to start if you're new to modern python, but the work we hope to build will rely on &lt;a href="https://dash.plotly.com/"&gt;dash&lt;/a&gt; for the frontend part, to have the full web stack within python! Plus the infra bricks are a little more numerous here, since we want to do more than just we app development (remember: build a full-fledged infra stack for a small structure) &lt;/p&gt;

&lt;p&gt;The first brick is &lt;a href="https://github.com/FR-PAR-ECOACT/ecodev-core"&gt;there&lt;/a&gt; and the associated documentation &lt;a href="https://ecodev-doc.lcabox.com/libraries/core/"&gt;there&lt;/a&gt;. But one step at a time! Let's first setup the infra, then I'll talk python! 🥰&lt;/p&gt;

</description>
      <category>docker</category>
      <category>devops</category>
    </item>
    <item>
      <title>2nd EcoAct OS release: ecodev-infra</title>
      <dc:creator>Thomas Epelbaum</dc:creator>
      <pubDate>Tue, 05 Mar 2024 10:04:25 +0000</pubDate>
      <link>https://forem.com/tepelbaum/2nd-ecoact-os-release-ecodev-infra-o68</link>
      <guid>https://forem.com/tepelbaum/2nd-ecoact-os-release-ecodev-infra-o68</guid>
      <description>&lt;p&gt;Writing code is a developer's day-to-day job, but getting that written code to its end-user is quite a different matter! &lt;/p&gt;

&lt;p&gt;EcoAct is once again contributing to the open source world, this time with a brick aimed at helping devops 😊. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/FR-PAR-ECOACT/ecodev-infra"&gt;ecodev-infra&lt;/a&gt;  is in fact a code base that enables an enthousiastic programmer or a small structure (SME, startup in its infancy) to create a production environment in a few simples actions (for those that master docker and docker-compose). &lt;/p&gt;

&lt;p&gt;Available in ecodev-infra : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a reverse proxy (traefik)&lt;/li&gt;
&lt;li&gt;a database (postgresql) and its administrator interface (pgadmin)&lt;/li&gt;
&lt;li&gt;a job scheduler (cron ofelia)&lt;/li&gt;
&lt;li&gt;a private pypi (pypiserver)&lt;/li&gt;
&lt;li&gt;internal documentation (bookstack)&lt;/li&gt;
&lt;li&gt;a storage server (minio)&lt;/li&gt;
&lt;li&gt;SSO application (keycloak)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As well as a procedure for setting up an ubuntu Linux VM securely, and a few cybersecurity tips. &lt;/p&gt;

&lt;p&gt;Documentation can be found &lt;a href="https://ecodev-doc.lcabox.com/cookiecutters/infra/"&gt;here&lt;/a&gt;! 😊 &lt;/p&gt;

&lt;p&gt;Please note: this brick is really intended for users who want to quickly iterate and test these new technologies. Once the business model has been established, we strongly recommend that you make the transition to managed services (we talk about this in the documentation). &lt;/p&gt;

&lt;p&gt;As with &lt;a href="https://github.com/FR-PAR-ECOACT/ecodev-core"&gt;ecodev-core&lt;/a&gt;, feel free to use whatever you need! &lt;/p&gt;

&lt;p&gt;The next brick will complete the lego construction that we aimed to give to the developer community at the start of the year: a secure dashboard website developed in python dash, integrating the previous bricks, and all usable in less than 5 minutes. Stay tuned! 😊&lt;/p&gt;

</description>
      <category>python</category>
      <category>docker</category>
      <category>fastapi</category>
    </item>
    <item>
      <title>ecodev-core: low level helpers around FastAPI and SQLModel</title>
      <dc:creator>Thomas Epelbaum</dc:creator>
      <pubDate>Tue, 05 Mar 2024 10:01:01 +0000</pubDate>
      <link>https://forem.com/tepelbaum/ecodev-core-low-level-helpers-around-fastapi-and-sqlmodel-3oll</link>
      <guid>https://forem.com/tepelbaum/ecodev-core-low-level-helpers-around-fastapi-and-sqlmodel-3oll</guid>
      <description>&lt;p&gt;Hi all! 🙂 &lt;/p&gt;

&lt;p&gt;my collegues and I recently released &lt;a href="https://github.com/FR-PAR-ECOACT/ecodev-core"&gt;ecodev-core&lt;/a&gt; . As explained in the associated &lt;a href="https://ecodev-doc.lcabox.com/"&gt;documentation&lt;/a&gt;, we make thorough use of Pydantic/FastAPI/SQLModel  in our work and we were ending up repeating the same boiler plate code in our 20+ applications. We just decided to factorize this code in a library, that we are happy to share (MIT licence) to everyone that might find it useful. Install it, copy what you need in your projects... Whatever you see fit 😊 &lt;/p&gt;

&lt;p&gt;This is the first out of 4/5 libraries/&lt;a href="https://cookiecutter.readthedocs.io/en/stable/"&gt;cookiecutter&lt;/a&gt; that we plan on releasing this year, the end goal being to have a full python equivalent of &lt;a href="https://github.com/tiangolo/full-stack-fastapi-postgresql"&gt;Tiangolo stack&lt;/a&gt; (with the frontend made with dash). Obviously Tiangolo project is 10.000 times better than ours, but if you do not want to learn react/vue... Stick with python and still produce a decent dashboard application with a decent associated infra, you might want to say tune to our future release!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Part 1 (what this post is all about! 😆) is essentially a set of helper methods around FastAPI and SQLModel which helps us quicken the setup our web-apps, with authentication, logging, monitoring, and other basic database and API interaction work.&lt;/li&gt;
&lt;li&gt;Part 2 will focus on an infra in our opinion suitable for a small startup &lt;/li&gt;
&lt;li&gt;Part 3 (small) on wrappers around dash components&lt;/li&gt;
&lt;li&gt;Part 4 will be an advanced object storage read/write library aimed at being blob/s3 protocol agnostic. &lt;/li&gt;
&lt;li&gt;Part 5 will be a cookie cutter app template in the spirit of &lt;a href="https://github.com/tiangolo/full-stack-fastapi-postgresql"&gt;Tiangolo stack&lt;/a&gt;  (again, as mentionned, surely 10.000 inferior to Tiangolo work but fully in python), linking all parts together.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Stay tuned!&lt;/p&gt;

</description>
      <category>python</category>
      <category>docker</category>
      <category>fastapi</category>
    </item>
  </channel>
</rss>
