mirror of
https://github.com/Haxxnet/Compose-Examples
synced 2024-11-25 04:51:13 +00:00
5bd7e26592
add option for custom php.ini
34 lines
1.2 KiB
YAML
34 lines
1.2 KiB
YAML
version: "3"
|
|
|
|
services:
|
|
web:
|
|
image: nginx:latest
|
|
hostname: nginx
|
|
volumes:
|
|
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/nginx/www-data:/var/www # place your files for web here
|
|
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/nginx/nginx-conf:/etc/nginx/conf.d # place provided nginx.conf here
|
|
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/nginx/logs:/var/log/nginx
|
|
container_name: nginx
|
|
restart: unless-stopped
|
|
ports:
|
|
- 8080:80
|
|
#labels:
|
|
# - traefik.enable=true
|
|
# - traefik.http.routers.nginx.rule=Host(`nginx.example.com`)
|
|
# - traefik.http.services.nginx.loadbalancer.server.port=80
|
|
# - traefik.docker.network=proxy
|
|
# # Part for local lan services only
|
|
# #- traefik.http.routers.nginx.middlewares=error-pages-middleware@docker
|
|
|
|
php:
|
|
image: php:8-fpm-alpine
|
|
hostname: php
|
|
volumes:
|
|
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/nginx/www-data:/var/www # must be same path to www-data as above
|
|
#- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/php/custom-php.ini:/usr/local/etc/php/conf.d/php.ini:ro
|
|
container_name: php
|
|
restart: unless-stopped
|
|
working_dir: /var/www
|
|
expose:
|
|
- 9000
|