docker:nginx:docker_compose
This is an old revision of the document!
Table of Contents
Docker - Nginx - Docker Compose
Docker Compose - lscr.io
--- 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
Link with PHP
version: '3' services: web: image: nginx:latest ports: - "8080:80" volumes: - ./src:/usr/share/nginx/html links: - php php: image: php:7-fpm
NOTE:
- php – It will download php-fpm image, create a container and link it with the Nginx container.
References
docker/nginx/docker_compose.1753085350.txt.gz · Last modified: 2025/07/21 08:09 by peter