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
4 changed files with 18 additions and 16 deletions
Showing only changes of commit 47cfd36ac0 - Show all commits

1
.gitignore vendored
View File

@ -2,4 +2,3 @@ webroot/download
webroot/data/buildbot-status.json
*.log
*.pyc
Dockerfile

5
Dockerfile Normal file
View File

@ -0,0 +1,5 @@
FROM php:8.1-apache
RUN a2enmod proxy && a2enmod rewrite
EXPOSE 80

View File

@ -14,22 +14,9 @@ To run the site:
### Setup with Docker
To run the website with Docker, create a `Dockerfile` with the following content:
```dockerfile
FROM php:8.1-apache
RUN a2enmod proxy && a2enmod rewrite
COPY etc/000-default.conf /etc/apache2/sites-available/000-default.conf
```
Then run:
* `docker build . -t blender-buildbot-www`
* `docker run -d -p 80:80 --name blender-buildbot-www -v "$PWD":/var/www/html:ro blender-buildbot-www`
Next time you need to start the container:
* `docker start blender-buildbot-www`
To run the website with Docker, use the included `Dockerfile` and `compose.yml`:
* `docker compose up -d --build`
## The download directory

11
compose.yml Normal file
View File

@ -0,0 +1,11 @@
version: '3.8'
services:
php:
build: .
container_name: php-apache
ports:
- "80:80"
volumes:
- ./:/var/www/html
- ./etc/000-default.conf:/etc/apache2/sites-enabled/000-default.conf