An open API service indexing awesome lists of open source software.

https://github.com/pasdam/docker-web-stack

Web-stack (Nginx/PHP/MySQL) with docker-compose
https://github.com/pasdam/docker-web-stack

Last synced: 4 months ago
JSON representation

Web-stack (Nginx/PHP/MySQL) with docker-compose

Awesome Lists containing this project

README

          

# docker-web-stack

This repository contains a [docker-compose](docker-compose.yaml) file to start a
web stack with [nginx](https://www.nginx.com/), [php8](https://www.php.net/),
and [MySQL](https://www.mysql.com/), using **only official images**.

To run the stack:

```sh
docker-compose up
```

The website files should be in the folder `www`.

## Usage

Create a local `env` file with the required secrets:

```sh
cat << EOT > mariadb.local.env
MYSQL_ROOT_PASSWORD=your_mysql_root_password
EOT
```

then spin up the containers:

```sh
docker-compose up
```

At this point you should be able to access the website at
[localhost](http://localhost/): it should show a summary of the PHP config.

## Legacy version

In case you need to run a stack with a legacy version of PHP 5 you can use the
`docker-compose-legacy.yml`, which uses an old PHP image.