-
Notifications
You must be signed in to change notification settings - Fork 17
Docker installation
⚠ This is experimental. Feedback is welcome
Docker allow to run the services in a virtual environment and as such, allow to run a specific version of apache-php and of mysql. This allows, we hope, an easier way for the installation. The image is based on Debian.
Install docker
for your platform.
Install git
if you don't have it yet.
In console, create a directory of your choice, and move inside it.
Clone the repository containing the docker instructions:
git clone https://github.com/papoteur-mga/phpip-docker.git
cd phpip-docker
Launch the build of the image:
docker-compose build
If all went OK, launch the machine:
docker-compose up
Launch the script to get phpip code through a git clone
, composer
installation, database initialization and to do various settings:
docker-compose exec php-apache bash install-phpip-docker.sh
With default configuration, you will get the application at this link
For accessing the database:
docker-compose exec mysql mysql -u root -p
The first mysql
is the name of the docker machine. The second is the command to execute in the machine.
phpip
clone is stored in app
directory. app
contains a .env.docker
file with settings for the application, which is then copied as .env
in the application folder.
Place the backup file in script
directory, for example backup.sql
. This directory as been declared accessible from mysql docker machine.
Launch a access to mysql as shown above.
Then in mysql, delete the database, create it again and import your backup file :
drop database phpip;
CREATE DATABASE IF NOT EXISTS phpip DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
source script/backup.sql;
You can access the apache machine with a bash console, and then apply standard instructions:
docker-compose exec php-apache bash