Docker: Describe and add Docker compose setup for local development #8
21
README.md
21
README.md
@ -14,9 +14,26 @@ To run the site:
|
|||||||
|
|
||||||
### Setup with Docker
|
### Setup with Docker
|
||||||
|
|
||||||
To run the website with Docker, use the included `Dockerfile` and `compose.yml`:
|
To run the website using Docker, follow these steps:
|
||||||
|
|
||||||
* `docker compose up -d --build`
|
Use the provided `Dockerfile` and `docker-compose.yml` to build and start the containers. Execute the following command:
|
||||||
|
```sh
|
||||||
|
docker compose up
|
||||||
|
```
|
||||||
|
|
||||||
|
Once the containers are up and running, you can access the website on port `8080`:
|
||||||
|
```sh
|
||||||
|
http://localhost:8080
|
||||||
|
```
|
||||||
|
|
||||||
|
If you prefer to use a different port, you can override the default port by setting the `HOST_PORT` environment variable. For example, to use port `9090`, run:
|
||||||
|
```sh
|
||||||
|
HOST_PORT=9090 docker-compose up
|
||||||
|
```
|
||||||
|
Then, access the website at:
|
||||||
|
```sh
|
||||||
|
http://localhost:9090
|
||||||
|
```
|
||||||
|
|
||||||
## The download directory
|
## The download directory
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ services:
|
|||||||
build: .
|
build: .
|
||||||
container_name: php-apache
|
container_name: php-apache
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "${HOST_PORT:-8080}:80"
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/var/www/html
|
- ./:/var/www/html
|
||||||
- ./etc/000-default.conf:/etc/apache2/sites-enabled/000-default.conf
|
- ./etc/000-default.conf:/etc/apache2/sites-enabled/000-default.conf
|
Loading…
Reference in New Issue
Block a user