https://github.com/simonwhitaker/php-in-docker-demo
https://github.com/simonwhitaker/php-in-docker-demo
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/simonwhitaker/php-in-docker-demo
- Owner: simonwhitaker
- Created: 2021-04-01T20:06:08.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-02T07:26:26.000Z (about 5 years ago)
- Last Synced: 2025-01-01T02:29:06.771Z (over 1 year ago)
- Language: PHP
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PHP in Docker Demo
A simple PHP web app project that uses Docker to provide Apache and PHP.
# Getting Started
1. Download and install Docker
2. In a terminal window:
```
docker-compose up -d
```
Then visit http://localhost:8080/
# Things to try
Understanding docker-compose...
1. Run `docker-compose ps` to see the state of your current containers
2. Run `docker-compose logs` to see logs from all containers, or e.g. `docker-compose logs web` to see just logs from the web container.
Understanding volumes...
1. Go to http://localhost:8080/ and add some messages
2. Run `docker-compose down` to stop and remove your containers, then `docker-compose up -d` to bring them back up
3. Go back to http://localhost:8080/ and reload
4. Repeat steps 2 and 3, but this time use `docker-compose down -v` to also remove volumes when you remove your containers.