Fully automatic docker container with nginx php redis stack integrated
2.4K
Fully automatic docker container with nginx php redis stack integrated.
Supports turning on/off components of the image and automatic deployment od Wordpress.
Recommended method is to use boot script:
wget https://gist.githubusercontent.com/dr4g0nsr/dd134080cc07e2d0e505cdd08e84a5a4/raw/f974f75a903ef306c2856d602993cab75513a560/boot.sh
bash boot.sh
It will ask you a few things, similar like in docker-compose fields below.
Basic docker-compose:
version: '3.5'
services:
npr:
image: dr4g0nsr/dbs-npr-stack:latest
restart: always
container_name: npr
hostname: npr
ports:
- 8080:80
- 8443:443
volumes:
- ./data/log/nginx:/var/log/nginx
- ./data/web:/var/www/html
- ./data/sites-enabled:/etc/nginx/sites-enabled
- ./data/ssl:/etc/nginx/ssl
- /etc/letsencrypt:/etc/letsencrypt
environment:
NGINX_ENABLED: "true"
PHP_ENABLED: "true"
REDIS_ENABLED: "false"
CRON_ENABLED: "false"
COMPOSER: "false"
NPM: "false"
SITES: "https://www.example.com,https://www.example1.com,http://test.com"
PROXY: "http://test.com-http://proxyto"
LE: "test.com"
EMAIL: "[email protected]"
SELFSIGNED: "www.example1.com"
WORDPRESS: "www.example.com"
DATABASE_HOST: "db"
DATABASE_USER: "wordpress"
DATABASE_PASSWORD: "wordpress"
DATABASE_NAME: "wordpress"
stdin_open: true
tty: true
proxyto:
image: nginx
hostname: proxyto
container_name: proxyto
db:
image: mysql:5.7
container_name: db
hostname: db
restart: always
environment:
MYSQL_DATABASE: 'wordpress'
MYSQL_USER: 'wordpress'
MYSQL_PASSWORD: 'wordpress'
MYSQL_ROOT_PASSWORD: 'root'
volumes:
- ./data/mysql:/var/lib/mysql
Here you can setup next things:
Super-simple example that should work:
version: '3.5'
services:
npr:
image: dr4g0nsr/dbs-npr-stack:latest
restart: always
container_name: npr
hostname: npr
ports:
- 80:80
- 443:443
volumes:
- ./data/log/nginx:/var/log/nginx
- ./data/web:/var/www/html
- ./data/sites-enabled:/etc/nginx/sites-enabled
- ./data/ssl:/etc/nginx/ssl
- /etc/letsencrypt:/etc/letsencrypt
environment:
NGINX_ENABLED: "true"
PHP_ENABLED: "true"
REDIS_ENABLED: "false"
CRON_ENABLED: "false"
COMPOSER: "false"
NPM: "false"
SITES: "https://domain.com"
LE: "domain.com"
EMAIL: "[email protected]"
WORDPRESS: "domain.com"
DATABASE_HOST: "db"
DATABASE_USER: "wordpress"
DATABASE_PASSWORD: "wordpress"
DATABASE_NAME: "wordpress"
stdin_open: true
tty: true
db:
image: mysql:5.7
container_name: db
hostname: db
restart: always
environment:
MYSQL_ROOT_PASSWORD: 'root'
volumes:
- ./data/mysql:/var/lib/mysql
Content type
Image
Digest
sha256:281281985…
Size
285 MB
Last updated
8 months ago
docker pull dr4g0nsr/dbs-npr-stack