version: "3.9"
services:
web:
image: php:7.4-apache
container_name: web
restart: always
volumes:
- ./:/var/www/html
- /srv/www/logs/apache2:/var/log/apache2
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
restart: always
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
ports:
- "80:80"
- "443:443"
links:
- web
whoami:
image: jwilder/whoami
environment:
- VIRTUAL_HOST=whoami.local