<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ivan on Medium]]></title>
        <description><![CDATA[Stories by Ivan on Medium]]></description>
        <link>https://medium.com/@scourge?source=rss-bcb175b26b9a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Ivan on Medium</title>
            <link>https://medium.com/@scourge?source=rss-bcb175b26b9a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 02:37:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@scourge/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Deploy your app to AWS EB using Docker Compose and EB-cli]]></title>
            <link>https://medium.com/@scourge/deploy-your-app-to-aws-eb-using-docker-compose-and-eb-cli-03ba5c9f540f?source=rss-bcb175b26b9a------2</link>
            <guid isPermaLink="false">https://medium.com/p/03ba5c9f540f</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[elastic-beanstalk]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[docker-compose]]></category>
            <dc:creator><![CDATA[Ivan]]></dc:creator>
            <pubDate>Thu, 09 Nov 2023 19:15:04 GMT</pubDate>
            <atom:updated>2023-11-09T19:15:04.967Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5YjUuR4N2HB0L5hY" /><figcaption>Photo by <a href="https://unsplash.com/@pkernstock?utm_source=medium&amp;utm_medium=referral">Patrik Kernstock</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>So, you’ve just finished building your web app, and following everyone’s advice, you’ve containerized your project using Docker Compose. However, now you’re faced with the task of actually hosting your application and feeling lost amid the different services and methods available.</p><p>In my opinion, the easiest method is to host your application on AWS’s Elastic Beanstalk (EB), as it manages monitoring, auto-scaling, load-balancing, and deployment completely by itself.</p><p>All you need is your existing docker-compose file because all EB does in the background is create an Elastic Compute Cloud (EC2) instance, a virtual Linux machine, and runs the Docker engine on it. This also means that all the network and volume settings you configured will still work as intended!</p><h3>Pushing Images</h3><p>The first thing to understand is that unless the image you just obtained from Dockerhub is unchanged (meaning you did not use a Dockerfile to download dependencies, copy your code, or anything else), you will have to build a custom image, push it to Elastic Container Registry (ECR), and use it as an image.</p><p>For visual learners, this will change your service from looking like this:</p><pre>nginx_ss:<br>  build: ./nginx<br>  restart: unless-stopped<br>  ports:<br>  - &quot;80:80&quot;</pre><p>to this</p><pre>nginx_ss:<br>  image: *********.dkr.ecr.eu-central-1.amazonaws.com/nginx_ss<br>  restart: unless-stopped<br>  ports:<br>  - &quot;80:80&quot;</pre><p>You will then need to create a new repository on ECR and log into the repository with the URL you get from the <em>describe-repositories</em> command, which will look something like this:</p><pre>123456789.dkr.ecr.eu-central-1.amazonaws.com</pre><blockquote>Note that you will need to have the AWS-cli installed and configured</blockquote><pre> aws ecr create-repository --repository-name &lt;name this whatever you like&gt;<br> aws ecr describe-repositories | grep repositoryUri  # will give you the url for your repo<br> aws ecr get-login-password --region &lt;your region&gt;| docker login --username AWS --password-stdin &lt;repo url&gt;  </pre><p>After you are logged in, you will have to tag your docker image and push it to the repository. But first, you need to (if not already done) build the images from your docker-compose file-</p><pre>docker-compose build<br>docker images  # will show you the name of all images</pre><p>You can the use the names of the newly built images for:</p><pre>docker tag &lt;name from docker images&gt;:latest &lt;repo url&gt;/&lt;name you chose when creating repo&gt;:latest<br>docker push &lt;repo-url&gt;/&lt;the name you chose when creating repo&gt;:latest</pre><p>This may take some time and has to be done for each image you use a Dockerfile on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GNTd3ADD84fUmYrqO-frXA.png" /></figure><p>After you have pushed your images to ECR, youcan now use the image’s new URL inside your docker-compose.yml</p><pre>version: &#39;3.7&#39;<br><br>volumes:<br>  my-storage:<br><br>services:<br>  nginx_ss:<br>    image: ****.dkr.ecr.eu-central-1.amazonaws.com/nginx_ss<br>    restart: unless-stopped<br>    ports:<br>      - &quot;80:80&quot;<br><br>  flask_ss:<br>    image: ****.dkr.ecr.eu-central-1.amazonaws.com/flask_ss<br>    volumes:<br>      - my-storage:/app/server/storage<br>    depends_on:<br>      - redis_ss<br>    tmpfs:<br>      - /dev/shm<br>    restart: unless-stopped<br><br>  redis_ss:<br>    container_name: redis_container<br>    image: redis:alpine3.18<br>    restart: unless-stopped</pre><p>As you can see, the redis-container did not need to be pushed to ECR and so it still has the image from DockerHub, while my Flask and Nginx services have URLs from ECR.</p><h3>Configuring the application</h3><p>Before we deploy our application I wan’t to cover a very important topic which was always overlooked in all the other guides I saw: the configuration. Since we deploy the webapp using the EB-cli we won’t get the fancy wizard asking us all kinds of configurations for our environment.</p><p>To do this we have to create a .ebextensions folder in our root directory. All the files ending with .config will then be automatically used to configure our environment. For example if you wan’t to upgrade the default t3.micro to something bigger one of your files would look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*Vi2n_r-P1s-jV-Qfp_U0CQ.png" /></figure><pre># settings.config<br><br>option_settings:<br>  - namespace: aws:autoscaling:launchconfiguration<br>    option_name: InstanceType<br>    value: t3.small</pre><h3>Deploying the application</h3><p>The next step is to install the eb-cli using</p><pre>pip install awsebcli</pre><p>This will give you access to the eb commands. First you will need to configure your cli and then create a new environment.</p><pre>eb init<br>eb create &lt;name your environment&gt;</pre><p>The command will let you choose an application (which can hold multiple environments) and configure other settings such as SSH-connection or region.</p><p>eb create will automatically setup your environment and deploy it. You should now be able to access your application in the browser.</p><h3>Further details</h3><p>If you wan’t to update your application you will have to:</p><ul><li>rebuild your images, I recommend a second docker-compose file which still has the build command</li><li>repush the images to ECR</li><li>call eb deploy</li></ul><p>This will by default do a running deployment, meaning you will have no downtime while switching the versions of your application. I recommend writing a bash-script which does all of this to automate this task.</p><blockquote>Don’t forget that unless you commit your changes, EB will not see them!</blockquote><p>For debugging purposes, you can access your applications logs by calling:</p><pre>eb logs</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=03ba5c9f540f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I am teaching myself design using artificial intelligence]]></title>
            <link>https://medium.com/@scourge/how-i-am-teaching-myself-design-using-artificial-intelligence-739e8f40822c?source=rss-bcb175b26b9a------2</link>
            <guid isPermaLink="false">https://medium.com/p/739e8f40822c</guid>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[midjourney]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[ux]]></category>
            <dc:creator><![CDATA[Ivan]]></dc:creator>
            <pubDate>Fri, 14 Jul 2023 16:21:14 GMT</pubDate>
            <atom:updated>2023-07-14T16:21:14.957Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sH-5INmZJjD-M-b8HOHDvA.png" /><figcaption>finished Figma design</figcaption></figure><p>As a web developer, it would be a useful skill to be able to sketch and design my own webpages, so a few weeks ago I set myself the goal to learn at least the basics of ui/ux design .After I was done teaching myself basic design principles, the next step was practicing by building demo websites, where I encountered an annoying obstacle: the content.</p><p>In order to be able to practice what I actually want, I first needed to develop an imaginary business; find fitting pictures (of which all should have the same art style and have specific features); and write slogans, headlines, and product descriptions. With artificial intelligence this hassle. ends now! LLMs (Large Language Models) are able to write better than most humans; Image generation neural networks can (with proper Prompt engineering) generate any image you want in any artstyle you want. All of that is free and takes mere seconds!</p><p>Now I was ready to start designing a mobile web-app for (the imaginary) JuicedUp, a juice manufacturer and distributer. Using Midjourney, I first generated all of the images I would need. I wanted a clean and simplistic design, so I used keyword such as: “simple”, “vector image”, “pastel color”, or “website image”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AnnQDglL-WZZ6mkf-TYwug.png" /><figcaption>generating images using Midjourney discord bot</figcaption></figure><p>For generating a product description I simply used ChatGPT, and refined the answer by asking to f.e. shorten it or include specific words.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*85Be3far5Trx_QxpljE58Q.png" /><figcaption>generating product description using ChatGPT</figcaption></figure><p>Using AI I was able to build a simple page in about 20 minutes, something which would have taken me way longer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=739e8f40822c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>