Get file:
$ wget https://bytesofprogress.net/resources/docker-compose/nginx/docker-compose.yml
Contents of file:
services:
nginx:
image: nginx:latest
container_name: nginx
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d
- ./nginx/html:/usr/share/nginx/html
ports:
- "80:80" # HTTP
- "8080:8080" # HTTP-Proxy
- "443:443" # HTTPS
restart: unless-stopped
Additional information: You need to create a config file (vhosts), located at "nginx/conf.d/defaut.conf".