DockerTemplate is a template for creating a Docker image for a web application. Make sure that port 3306
and 8080
are available.
- Clone this repository.
- Place your web application in the
public/
directory. - Finaly run
docker-compose up --build
to start the container. The web server is up at http://localhost:8080
This template uses MariaDB as a database.
To fill the database with data, use the init/schema.sql
and init/data.sql
files.
You can use composer to install dependencies.
- Run
docker-compose exec --workdir /app php /bin/bash
to enter the container. - Then run
composer install
to install the dependencies.