Categories
DevOps

Configuring rclone remotes with Linode Object Storage (S3)

Rclone is a widely used open source CLI tool written in Go which allows for transferring, storing and syncing content between local file systems and cloud storage backends such as S3 buckets. It is oftentimes referred to as the Rsync for Cloud Storage. I have used Rclone on numerous occasions in conjunction with a wide variety of cloud storage solutions including Google Cloud Storage, Ceph and multiple S3-compatible services. Since I have found setting up Rclone to work properly with Linode’s Object Storage service a bit tricky, I have decided to share the setup instructions.

Categories
Backend Frontend

3 JavaScript Libraries that changed the way I develop Full-Stack Projects

In the dynamically-evolving (or, if you insist, absurdly inflated) JavaScript library ecosystem, every once in a while I come across a new module, which considerably impacts the way I build my projects as a full-stack developer. I’ve decided to compile a short list of three JavaScript libraries which I have discovered over the last two years that greatly improved my workflow and have become my go-to choice when developing full-stack applications.

Categories
Backend DevOps

Providing environment variables default values via Spring application.yaml

Storing backend application configuration values in environment variables is a common practice that makes most DevOps works easier. In a recent project, my task was to setup a CI/CD pipeline for a Java Spring application. In order to do that, I had to configure the application so that it would read the database connection values from env variables in both staging and production environment while falling back to default values if the desired variables were not provided.

Categories
Backend

Declaratively bypassing guards in a NestJS endpoint with JWT and RBAC

I recently started using NestJS – a relatively new Node.js backend framework, which puts convention over configuration. One of the concepts introduced by NestJS are guards, which are a context aware alternative to regular Express middleware. In one of my projects, I’ve run into a use case, which well illustrates the advantages of guards vs middleware.

Categories
DevOps

Deploying ASP.NET Core app to Azure App Service via GitHub Actions with testing

When setting up CI/CD pipeline in one of my projects I decided to give Azure App Service a try. I was using GitHub Actions for building and testing the app written in ASP.NET Core. While there were a plenty of resources about how to configure actions with a basic project structure, I couldn’t find any YAML that could be used when you have your project split into two for testing (as required by .NET) and hence decided to share.

Categories
ERP Customization

Adding quick create button to SuiteCRM AOS Products module popup view

The popup view usually serves the purpose of choosing a related record. Oftentimes, the user will realize that the desired record is not in the database and has to be created. This is where quick create buttons make the process easier by allowing the user to create a new record from within the popup view, without the need to close the popup and navigate to another module.

Categories
Databases

PostgreSQL B*-tree index benchmark

I’ve recently started fiddling with PostgreSQL performance optimization. Here is a little benchmark that I’ve compiled in order to investigate impact of Postgres indexes usage on query execution times and disk usage.

Categories
Frontend

Simple AES end-to-end encryption using crypto-js

In one of my recent projects, I wanted to ensure that the end users could securely share resources between one another knowing that the service operator (in this case being me) won’t be able to access their data.

Categories
DevOps

How to fix OnlyOffice download failed error when enforcing Nextcloud https with Docker

Recently I had a task to install Nextcloud with OnlyOffice integration on a client’s server. In order to save some time, I’ve decided to use the official repository that allows for OnlyOffice and Nextcloud installation via Docker compose. It’s container structure looks like this:

  • app-server which is basically a Nextcloud instance
  • onlyoffice-document-server self-explanatory
  • nginx-server which acts as a reverse proxy for Nextcloud and OnlyOffice

Everything was fine up until the point in when I decided to edit the nginx config file (/docker-onlyoffice-nextcloud/nginx.conf) in order to enforce SSL usage by redirecting HTTP to HTTPS. After restarting the nginx server container, OnlyOffice would no longer load the documents inside Nextcloud’s UI (“Download failed.” was all the info it gave me).