Public Repository

Last pushed: 8 months ago
Short Description
Our mysql image, this image creates a francken database on startup
Full Description
  • Francken Docker Environment

This repository can be used to setup a development environment that runs on

A shell script is included which, once you execute it, will setup our
environment for you which includes setting an =.env= file, installing dependencies
(both composer and npm), generating css, setting an encryption key and finally
starting a nginx server so you can start working on the website and see it on

Once everything is working you should check the documentation on the main
repository to find some tips on how to work with our application.

** Requirements

There are 4 requirements that you will need to setup yourself before you can
start using our shell script to setup your docker environment.

* Gotchas

Once you've installed Docker be sure to add your user to the Docker group and
logout and login again, otherwise you will get permission errors.

** Manual instructions

The following are instructions on how to setup our environment without using the file, which might be useful if you want to know more about each step
in the file, or if you're on Windows.

First clone this repo to some folder where you'd like to work, i.e.,

cd Projects
git clone


Next clone the [[][ProfessorFrancken/ProfessorFrancken]] repo inside the folder that's
been cloned and name it Francken (this is because our =docker-compose.yml= file
assumes the folder's name is "Francken"),

cd docker
git clone Francken


Next go to the =francken= directory and copy and rename the =.env.example= file,

cd Francken
cp .env.example .env


** Install npm dependencies
We're using [[][Laravel Mix]] to compile [[][scss]] files to css for this we will have to
install some npm dependencies,


Install dependencies

docker-compose run npm npm install

Compile our css files

docker-compose run npm npm run dev


** Install php dependencies
Next our application's php dependencies need to be installed, run

docker-compose run composer install


Next generate a private key that is used for encryption,

docker-compose run php php artisan key:generate


** Start the server
Once the composer dependencies have been installed (this might take a while
depending on your internet speed) you can start the server by running,

docker-compose up -d nginx


Next run =docker-compose run php php artisan migrate --seed= to migrate the
database. You should now be able to access the server at =localhost=.

You might get the following error when executing =docker-compose run php php artisan migrate --seed=,


SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = francken and table_name = migrations)

SQLSTATE[HY000] [2002] Connection refused


This means that the mysql server hasn't finished initializing yet, wait a while
(≈ 1 minute) and try again.

* Stopping the server
To stop the server run =docker-compose down=.

** Testing
The unit and integration tests can be run using,

docker-compose run php vendor/bin/phpunit


** Testing with coverage
Use the =test_coverage= container which includes xdebug to add collect coverage

docker-compose run test_coverage vendor/bin/phpunit

Or run humbug, a mutation testing tool

docker-compose run test_coverage vendor/bin/humbug


Docker Pull Command