Skip to content

davaoio/docker-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker / PHP Demo

This project is a simple container that demonstrates a Docker / PHP stack. It should allow people to get "something" up and running quickly.

Tech Stack

  • Docker
  • docker-compose
  • PHP
  • MariaDB

Getting Started

Get the environment running:

docker-compose up --build

Test the connection:

curl https://localhost:5000

(or open a web browser to: https://localhost:5000):

Access MySQL:

docker exec -it db mysql

How it works

We start with the Docker image php:7.3-apache. This container source code can be found here: https://github.com/docker-library/php/blob/5992cb02fa5b3d76baffad60d94052a805958553/7.3/buster/apache/Dockerfile

docker-compose is only used for local development. It allows us to have a complete environment for testing. It links up the src/ directory to /var/www/html/ inside the container. So you just need to save your code and can refresh the browser to pick up the changes.

Future Ideas

  • / - Index endpoint - Return a simple "Hello world"
  • /error - Error endpoint - Return a 404 error and log to server

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published