Docker: Describe and add Docker compose setup for local development #8
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,4 +2,3 @@ webroot/download
|
||||
webroot/data/buildbot-status.json
|
||||
*.log
|
||||
*.pyc
|
||||
Dockerfile
|
||||
|
5
Dockerfile
Normal file
5
Dockerfile
Normal file
@ -0,0 +1,5 @@
|
||||
FROM php:8.1-apache
|
||||
|
||||
RUN a2enmod proxy && a2enmod rewrite
|
||||
|
||||
EXPOSE 80
|
28
README.md
28
README.md
@ -14,22 +14,26 @@ To run the site:
|
||||
|
||||
### Setup with Docker
|
||||
|
||||
To run the website with Docker, create a `Dockerfile` with the following content:
|
||||
To run the website using Docker, follow these steps:
|
||||
|
||||
```dockerfile
|
||||
FROM php:8.1-apache
|
||||
RUN a2enmod proxy && a2enmod rewrite
|
||||
COPY etc/000-default.conf /etc/apache2/sites-available/000-default.conf
|
||||
Use the provided `Dockerfile` and `docker-compose.yml` to build and start the containers. Execute the following command:
|
||||
```sh
|
||||
docker compose up
|
||||
```
|
||||
|
||||
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`
|
||||
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
|
||||
|
||||
|
11
compose.yml
Normal file
11
compose.yml
Normal file
@ -0,0 +1,11 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
php:
|
||||
build: .
|
||||
container_name: php-apache
|
||||
ports:
|
||||
- "${HOST_PORT:-8080}:80"
|
||||
volumes:
|
||||
- ./:/var/www/html
|
||||
- ./etc/000-default.conf:/etc/apache2/sites-enabled/000-default.conf
|
Loading…
Reference in New Issue
Block a user