Docker: Describe and add Docker compose setup for local development #8

Merged
Bart van der Braak merged 2 commits from docker-compose into master 2024-07-25 09:08:03 +02:00
2 changed files with 20 additions and 3 deletions
Showing only changes of commit 1861970d20 - Show all commits

View File

@ -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

View File

@ -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