Running Laravel Dusk tests on Bitbucket, the easy way

So today I was trying to run and see if I can manage to get Laravel dusk to run on Bitbucket pipelines, and after too many tests, I was able to do so \(^ ^)/.

In this post I’ll explain the minimum requirements you need to do that, to make things simple, I created a docker image based on PHP 7.2 that you can use directly.

Configure your Laravel project:

After installing Laravel and Laravel dusk (you can read all about it on the docs), you can create a new environment file called .env.dusk which contain the following:

Continue reading

Filed under: Code, docker, Laravel, Linux, PHP

A new Episode from Arab Dev talk, this time with two guests

As most of you know, me and my friend Omar Qadan hosts a technical talk were we just talk about any technical topic we find interesting, now this time we got two guests from Gaza Palestine, Mohammad and Waseem, and we interviewed them to know more about the obstacles they are facing in Gaza and how they are able to overcome them, and we also talked about the technical community there and how they are trying to work/operate under the bad conditions there.

To know more, you can head to https://arabdevtalk.com/f5b633c8 and listen to the talk.

Filed under: Arabic, Business, Personal

[snippet] Running Traefik with Docker Swarm

The other day, I wanted to try using Traefik in real world scenario where I’ll have a docker instance running and Traefik will do the routing/proxying based on the domain name that I will provide, sadly this was not so easy, so after few hours of searching I found the solution.

You may ask, why it didnt work, it should work with no problem, and I agree so am going to list the problem I faced and the solution I found. To work with swarm, I created three servers and joined them in one swarm network, where I had one manager and two workers, then I used this simple docker-compose.yml file to create the app

Continue reading

Filed under: Code, docker, Linux

2018 Plan, and more I guess

So now its nearly 2018 and still, we are still alive but as people say we are standing on a new phase where WW3 might come at any time. And since I do like to plan ahead for each step, I thought that I should put some plans for 2018, the list may change over the time, but at least I should have something to start with.

  1. I should stop buying courses/books/materials that I would not be able nor have the time to use.
  2. I should focus on getting back on the track with Laravel, JavaScript and Web technologies in general.
  3. Reading about ionic or any other mobile development language.
  4. Make sure that I use Docker in production :D, yes I read a lot, and talk a lot, but never had Docker in production (yet).
  5. The more important point is to work on enhancing my English (A lot).

These may seem few, but for me, they will need a lot of energy and hope to do them correctly (esp point 1 & 5).

 

Anyway, let’s see what 2018 will hold for us, at the end we all thought that 2017 will be less bad than 2016 and we were wrong.

Filed under: Personal

Run crontab within Alpinelinux Docker image

This post will explain how we can run cronjobs within Docker image based on Alpine Linux distribution, so am going to use my newest PHP 7.2 docker image, which you can find at zaherg/php-7.2-xdebug-alpine .

First, we will have to pull the docker image using the command:

Now that we have downloaded the image, we will have to familiarize our self with the structure for the periodic directory which we can find under /etc/periodic, this directory should contain the following folders:

  1. 15min
  2. hourly
  3. daily
  4. weekly
  5. monthly

Continue reading

Filed under: Code, docker, Linux