Sign inSign up

dr4g0nsr/nginx-php-redis

By dr4g0nsr

•Updated almost 3 years ago

LEMP stack and redis all in one container

Image
2

500K+

dr4g0nsr/nginx-php-redis repository overview

⁠Docker image with nginx,php,redis in one container

⁠File: .env

IMAGE_NAME=nginx-php-redis
IMAGE_VERSION=1.2
PHP_VERSION=7.4
HTTP_PORT=80
HTTPS_PORT=443

⁠File: docker-compose.yml

services:
    web:
        image: ${IMAGE_NAME}:${IMAGE_VERSION}
        hostname: web
        container_name: web
        volumes:
         - /etc/localtime:/etc/localtime:ro
         - /etc/timezone:/etc/timezone:ro
         - ./etc/nginx:/etc/nginx/conf.d
         - ./etc/ssl:/etc/ssl-generated
         - /etc/letsencrypt:/etc/letsencrypt:ro
         - ./www:/var/www/html
         - ./logs:/var/log/nginx
        ports:
         - "0.0.0.0:${HTTP_PORT}:80"
         - "0.0.0.0:${HTTPS_PORT}:443"
        ulimits:
         nproc: 65535
         nofile:
          soft: 20000
          hard: 40000
        stop_grace_period: 5s
        sysctls:
         - net.ipv4.ip_local_port_range=5000 65000
         - net.ipv4.conf.all.accept_redirects=0
         - net.ipv4.conf.all.secure_redirects=0
         - net.ipv4.conf.all.send_redirects=0
         - net.core.somaxconn=1024
        restart: always
        healthcheck:
         test: ["CMD", "/docker-healthcheck.sh"]
         interval: 30s
         timeout: 5s
         retries: 3
         start_period: 5s
        stdin_open: true
        tty: true

Tag summary

Content type

Image

Digest

sha256:d7c45c10f…

Size

250.9 MB

Last updated

almost 3 years ago

docker pull dr4g0nsr/nginx-php-redis