Skip to main content

Create your Joomla website using Docker - Part 2

· 25 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Create your Joomla website using Docker - Part 2

At the end of 2023, I wrote a very long post about using Joomla with Docker: Create your Joomla website using Docker - Part 1.

It was a step-by-step introduction to Docker and the creation of a local Joomla-based website.

I explained, at length, the various steps involved in creating a website, choosing a database engine (MySQL, MariaDB or PostgreSQL), choosing a specific version of Joomla / database engine, the type of volumes (should the site and database be kept in RAM or on the hard disk (i.e. the notion of volumes)) and many other things such as choosing the port for the website, creating an alias (something like http://my_project.local instead of http://127.0.0.1). I strongly urge you to read or re-read this article before starting this one.

important

Here is the link to that article : Create your Joomla website using Docker - Part 1.

As Docker and Joomla are evolving rapidly, I propose here to start from where we were and see what has changed since then.

We're also going to take automation a step further, making much greater use of the concept of makefile and a configuration file called .env.

Restore a Joomla backup using Docker

· 9 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Restore a Joomla backup using Docker

In previous articles (Part 1 and Part 2), we've seen how to create a Joomla site from scratch by using Docker: pull Joomla, PHP, Apache and MySQL from Docker Hub and do magic stuff so we have a fresh http://127.0.0.1:8080 local site.

In this article, we'll see how to restore on our machine, a backup created thanks to great Akeeba Backup component.

We'll reuse some files from Part 2 and make some changes to them.

At the end, we'll have a make import command that will start Akeeba Kickstart.

SSH - Launch a terminal on your session without having to authenticate yourself

· 5 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

SSH - Launch a terminal on your session without having to authenticate yourself

Imagine that you regularly need to connect to your Linux server: you need to launch a tool such as Putty, you need to enter your login, password, etc. and carry out various operations before you can access the terminal.

If your password isn't saved in Putty's configuration, you'll have to launch another tool like a password vault; in short, it's annoying.

In this article, we'll look at how to authenticate once and for all on the server using an SSH key.

Linux - Working with the history of your last fired actions

· 4 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Linux - Working with the history of your last fired actions

For me, one of the undeniable strengths of the command line under Linux is the management of the history of previously executed commands.

To be able to press the Up or Down keys on the keyboard to return to previously run commands, wow.

For older users, there was DOSKEY under MSDos, but Linux goes much further.

Let's look at a few tricks.

Linux - Using a progression bar in your script

· 6 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Linux - Using a progression bar in your script

In my previous article; Linux - Take advantage of the number of CPUs you have; start concurrent jobs, we've seen how to start jobs in parallel.

The next cool thing is to show a progression bar in your console. This has a number of advantages, including a clear view of what's been done and what's still to be done, as well as an attractive interface.

Months ago, I've found this french blog post in my RSS feeds: https://xieme-art.org/post/bash-avance-barre-de-progression/ and, just, wow!!!

Let's play with it.

Linux - Take advantage of the number of CPUs you have; start concurrent jobs

· 7 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Linux - Take advantage of the number of CPUs you have; start concurrent jobs

In my professional activity, I've been faced with the following requirement: process each line of a CSV file and make a POST API call to upload a document.

One line of the CSV contained information that needed to be communicated to an API service, and each line corresponded to a PDF file. So if there are 1000 lines in the CSV file, I have to make 1000 API calls to upload 1000 PDFs.

I wrote my script in Linux Bash and then it was time to optimise: not just one API call at a time, but as many as possible.

Let's how we can start more than one task at a time using Linux Bash.

Start Joomla with Docker in just a few clicks

· 2 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Start Joomla with Docker in just a few clicks

Yesterday lunchtime, while chatting with a friend, he highlighted a simple fact: explain the easiest way in the world to start a Joomla project with Docker.

The aim is to hop, hop, copy/paste a file, hop, Joomla is launched and you can start playing with the site.

Let's take a look; not in detail, but right to the point.

Write PHP unit tests using Pest

· 8 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Write PHP unit tests using Pest

If you think writing unit tests in PHP is fun, stay in the room; the rest of you please leave. And then everyone leaves, including the person who asked the question.

Writing “old-fashioned” unit tests with PHPUnit is so boring that almost nobody does it.

And for some time now, https://pestphp.com/ has come along and totally changed the way things are done.

Pest is a wrapper around PhpUnit so, for instance, every command line arguments supported by PhpUnit can be used for Pest.

Using the JetBrains Mono font in vscode

· 2 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Using the JetBrains Mono font in vscode

As you know, VSCode is highly customizable; you can install plethora of addons, change the default theme and use your preferred font.

Just take a look on the JetBrains Mono font. This is a free of charge font, for both commercial and non-commercial purposes.

In addition to the fact that it is particularly legible, making it much clearer to distinguish between an O (the letter) and a 0 (the number), between an I (upper-case I) and an l (lower-case l); JetBrains Mono font comes with nice ligature elements.