Skip to content

Instantly share code, notes, and snippets.

@marsyang1
Last active August 6, 2017 14:40
Show Gist options
  • Save marsyang1/f843fb92cfcd2ea67a0467095076f554 to your computer and use it in GitHub Desktop.
Save marsyang1/f843fb92cfcd2ea67a0467095076f554 to your computer and use it in GitHub Desktop.
# https://stackoverflow.com/questions/41378918/cant-see-staring-installation-page-of-wordpress-docker-container-based-on-alpin
version: '2'
services:
web:
image: nginx:latest
ports:
- 80:80
volumes:
- ./nginx_home/site.conf:/etc/nginx/conf.d/default.conf:ro
- /etc/localtime:/etc/localtime:ro
volumes_from:
- service
service:
image: store
volumes:
- ./wechat-store:/var/www/html
environment:
WORDPRESS_DB_PASSWORD: 1234
WORDPRESS_DB_HOST: mysql
mysql:
image: mysql
volumes:
- ./mysql_home:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: 1234
MYSQL_DATABASE: wordpress
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
server {
listen 80;
index index.php index.html;
server_name $hostname;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
root /var/www/html;
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass service:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment