networks: webserver: driver: bridge ipam: config: - subnet: 172.20.0.0/24 webserver: image: nginx:latest container_name: webserver networks: - webserver ports: - 7080:80 - 7443:443 restart: always volumes: - $DOCKERDIR/nginx/html:/var/www/html - $DOCKERDIR/nginx/conf/:/etc/nginx/conf.d/:ro
--- services: nginx: image: lscr.io/linuxserver/nginx:latest container_name: nginx environment: - PUID=1000 - PGID=1000 - TZ=Etc/UTC - NGINX_AUTORELOAD= #optional - NGINX_AUTORELOAD_WATCHLIST= #optional volumes: - /path/to/nginx/config:/config ports: - 80:80 - 443:443 restart: unless-stopped
version: '3' services: web: image: nginx:latest ports: - "8080:80" volumes: - ./src:/usr/share/nginx/html links: - php php: image: php:7-fpm
NOTE: