Skip to content
This repository has been archived by the owner on Jan 7, 2023. It is now read-only.

Starter for a dockerized Slim Framework application

License

Notifications You must be signed in to change notification settings

kreait/slim-php-docker-starter

Repository files navigation

Slim Framework Skeleton for Docker

A dockerized Slim Framework skeleton application as a starting point for new Slim Framework projects.

Requirements

Installation

Create a new project from this starter with

$ composer create-project kreait/slim-docker target-directory

The actual Slim Framework application will be located in target-directory/web.

Then, start up the dockerized application:

$ cd target-directory
$ docker-compose up

Images and Containers

The images for the application containers are built from the Dockerfiles in the docker directory so that you can modify them as needed for your application.

Helpers

The starter includes a Makefile to simplify the basic tasks:

  • make build builds new Docker images with the current project files being copied into the images.
  • make up-dev will add the settings from dev.yml to the default configuration and start the application with the web directory being mounted into the containers.
  • make up-prod will add the settings from prod.yml to the default configuration and start the application
  • make down will stop the application

Execute make or make help from the project root to show all available tasks.