Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/d9beud/docker-amp-vanilla
An ideal dockerized environment for Apache, MySQL and PHP.
https://github.com/d9beud/docker-amp-vanilla
apache2 docker docker-compose mariadb php php8
Last synced: about 1 month ago
JSON representation
An ideal dockerized environment for Apache, MySQL and PHP.
- Host: GitHub
- URL: https://github.com/d9beud/docker-amp-vanilla
- Owner: d9beuD
- License: mit
- Created: 2024-11-25T09:56:56.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-11-25T10:26:30.000Z (about 1 month ago)
- Last Synced: 2024-11-25T11:28:18.379Z (about 1 month ago)
- Topics: apache2, docker, docker-compose, mariadb, php, php8
- Language: Dockerfile
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker AMP Vanilla
The purpose of this template project is to provide a quick and easy way to get
a vanilla PHP project up and running with Docker. Ths project uses Apache, MySQL
and PHP.## Requirements
- [Docker](https://www.docker.com/)
- [Docker Composer](https://docs.docker.com/compose/)
- [Make](https://www.gnu.org/software/make/manual/make.html) (optional — [install `make` for Windows](https://stackoverflow.com/questions/2532234/how-to-run-a-makefile-in-windows))## Usage
The first thing to do is to change a little bit the `compose.yml` file. You can
change the `MYSQL_ROOT_PASSWORD` and `MYSQL_DATABASE` environment variables to
whatever you want. You really should change the `name` of the container to
something more meaningful.```diff
# compose.yml
- name: project-name
+ name: name-of-your-project
```Then, you can run the following command if you have `make`.
It will:
- Build the containers
- Start the containers```bash
make init
```### Or, step by step
You can run the following command to build the containers:
```bash
make build # or `docker-compose build` if you don't have `make`
```An image with [PHP](https://www.php.net), [Apache](https://httpd.apache.org), [MariaDB](https://mariadb.org) and [Composer](https://getcomposer.org) ready to use will be built.
After that, you can run the following command to start the containers:
```bash
make up # or `docker-compose up -d` if you don't have `make`
```Apache should be ready to serve your files. You can enter the Apache container by running the following command:
```bash
make exec # or `docker-compose exec apache bash` if you don't have `make`
# it will open a bash session inside the container
```You can now access your project at `http://localhost:8080`.
Remember that every time you want to run a Composer command, you should run it
inside the container thanks to the `make exec` command.