HUB
Sign inSign up

nedvedliao/typecho

By nedvedliao

•Updated over 6 years ago

Container running typecho in Nginx + PHP-FPM

Image
2

634

nedvedliao/typecho repository overview

⁠Overview

English | 简体中文⁠

The repo to build typecho blog

This is a Dockerfile/image, used to nginx and php-fpm build container

  • Support Redis
  • Support SSL
  • Custom nginx configuration
  • Custom php configuration
  • Tweak php-fpm config
  • Tweak nginx config
  • Nginx config file with the anti_spider(default no)
  • Php and nginx communication using the sock
  • Use Zend Opcache cache
  • Use docker-compose

If you have any improvement or Suggestions, please in making project page on open questions or request.

⁠Version

Docker TagNginx VersionPHP VersionAlpine Versionnoteport
nginx-php7.3-fpm1.18.07.3.173.10Integrated NGINX80, 443
php7.3-fpm1.18.07.3.173.10

⁠Module

ationVersionPHP Version
php-fpm7.3.17Core
ctype
curl
date
dom
fileinfo
filter
ftp
gd
hash
iconv
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
SimpleXML
sodium
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
zlib
redis
nginx1.18.0--prefix=/etc/nginx
--sbin-path=/usr/sbin/nginx
--modules-path=/usr/lib/nginx/modules
--conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log
--http-log-path=/var/log/nginx/access.log
--pid-path=/var/run/nginx.pid
--lock-path=/var/run/nginx.lock
--http-client-body-temp-path=/var/cache/nginx/client_temp
--http-proxy-temp-path=/var/cache/nginx/proxy_temp
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp
--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp
--http-scgi-temp-path=/var/cache/nginx/scgi_temp
--with-perl_modules_path=/usr/lib/perl5/vendor_perl
--user=nginx
--group=nginx
--with-compat
--with-file-aio
--with-threads
--with-http_addition_module
--with-http_auth_request_module
--with-http_dav_module
--with-http_flv_module
--with-http_gunzip_module
--with-http_gzip_static_module
--with-http_mp4_module
--with-http_random_index_module
--with-http_realip_module
--with-http_secure_link_module
--with-http_slice_module
--with-http_ssl_module
--with-http_stub_status_module
--with-http_sub_module
--with-http_v2_module
--with-mail
--with-mail_ssl_module
--with-stream
--with-stream_realip_module
--with-stream_ssl_module
--with-stream_ssl_preread_module
--with-cc-opt='-Os
-fomit-frame-pointer'
--with-ld-opt=-Wl,--as-needed

⁠Quick Start

⁠Building

git init
git remote add typecho https://github.com/Nedved-liao/Dockerfile.git
git fetch typecho
git checkout typecho/master --  typecho
⁠Building nginx-php-fpm
cd typecho/nginx-php-fpm
chmod +x scripts/*
docker build -t typecho:nginx-php7.3-fpm .
⁠Building php-fpm
cd typecho/php-fpm
chmod +x scripts/*
docker build -t typecho:php7.3-fpm .

⁠Pull from the docker hub

sudo docker push nedvedliao/typecho:nginx-php7.3-fpm
sudo docker push nedvedliao/typecho:php7.3-fpm

⁠Running

use nginx-php-fpm:

sudo docker run -d --name typecho -p 80:80 nedvedliao/typecho:nginx-php7.3-fpm 

You can use the browser to access http://\ < docker_host \ > / install. Typecho PHP installation

⁠Custom mount

If you want to custom website directory, you can use the following way.

sudo docker run -d --name typecho -p 80:80 -v /your_code_directory:/var/www/html  nedvedliao/typecho:nginx-php7.3-fpm 
More
docker run --name typecho -p 80:80 \
-v /your_code_directory:/var/www/html \
-v /your_nginx_conf_path:/etc/nginx/nginx.conf \
-v /your_nginx_virtual_host_conf_path:/etc/nginx/conf.d \
-v /your_nginx_certs_path:/etc/nginx/certs \
-d nedvedliao/typecho:nginx-php7.3-fpm

⁠Use docker-compose

1.Use nginx-php-fpm project docker-compose.yaml⁠

run docker-compose up -d

2.Use php-fpm project docker-compose.yaml⁠

Need and put the configuration file in nginx directory ,then docker-compose up - d

tree ./nginx
.
├── certs
│   ├── nginx.key
│   └── nginx.pem
├── conf.d
│   └── nginx-site-ssl.conf
└── nginx.conf

⁠Contributors

Author:

Email: [email protected]⁠

Link: https://www.nedved.st⁠

Tag summary
Recent tags
Content type
Image
Digest
Size
69 MB
Last updated
over 6 years ago
docker pull nedvedliao/typecho:latest