Following up from my previous blog post about the base setup of Traefik v2, I will now show how easy it is to set up Traefik as a reverse proxy to an AWS S3 bucket and redirect www to non-www.
In this blog post I will present a DevOps workflow I use to deploy a microservice based web application on a single node. We will use an example of an Angular 9 app, Node.js REST API backend and a Postgres database. We will orchestrate this system with Docker swarm and deploy it using Ansible. This will allow us to deploy, update and rollback the system with a single command. We will also use nginx-proxy as an entry point to the application and letsencrypt-nginx-proxy-companion to automate SSL certificates.
Just like any other web-based project, I decided to dockerize the Wordpress website I've been working on. This proved to be a more difficult task than I imagined due to user permission problems. At the end, I came up with an acceptable solution which I will describe in this post. The solution supports local Wordpress development and production deployment using docker-compose. I also provide boilerplate code for dockerized Wordpress.
In my opinion, a function (or a method) in any programming language should be clearly understandable just by its header - name and parameters. In Javascript, we sometimes create functions that accept objects, which can be more convenient, but this sacrifices readability of the function header. In this blog post I present ES6 object destructuring as a solution to this problem.