jtreminio / dashtainer

MIT License
50 stars 3 forks source link
docker docker-compose docker-gui php puphpet

Setup Guide

If you wish to run a copy of Dashtainer yourself for local development, the following steps will get you up and running within minutes.

Requirements

User and Group ID

Docker recommends not running container as root.

For development purposes, running containers as root means any files created by the container will show as owned by root on your host. Things like composer install or similar will be root owned and makes deleting them a pain.

Included is a helper script to generate a .env file that Composer will read and apply. All it does is pass along your user and group ID to Docker so it can create a user with the same values. Any files then created by the container will show as owned by your current user.

If you would rather the containers run as root, simply copy the included .env.dist to .env.

Container init

App configuration

Open the app in browser

The default user credentials are:

Database credentials

Open adminer.dashtainer.localhost in Chrome to use Adminer with the following credentials:

You may also access the database using Sequel Pro or any other MySQL-compatible GUI with:

Xdebug

Two PHP containers are created, php and php_xdebug. While Xdebug is installed on both containers, only php_xdebug has it activated by default.

To trigger Xdebug, you must set a cookie, XDEBUG_SESSION, to xdebug value.

Use the PhpStorm Bookmarklets generator to create your Start and Stop bookmarks. The IDE key should be xdebug.

Linux users

If spinning up Docker on a Linux host, the xdebug.remote_host value in PHP INI use host.docker.internal which does not currently work on Linux hosts (only Windows and MacOS for now).

To fix this, simply copy the docker-compose.override.yml.dist file to docker-compose.override.yml.

Unit tests