Created
March 14, 2017 04:18
-
-
Save rheinardkorf/aa3fef00be35ac3e7041ac5ec50027ff to your computer and use it in GitHub Desktop.
WordPress running on official WordPress Alpine version and official Alpine PHP-FPM version.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
nginx: | |
image: nginx:1.10.3-alpine | |
ports: | |
- 80:80 | |
- 443:443 | |
volumes: | |
- ./htdocs:/var/www/html | |
- ./site.conf:/etc/nginx/conf.d/default.conf | |
networks: | |
- wp-network | |
wordpress: | |
image: wordpress:4.7.3-php7.1-fpm-alpine | |
volumes: | |
- ./htdocs:/var/www/html | |
environment: | |
WORDPRESS_DB_HOST: db:3306 | |
WORDPRESS_DB_PASSWORD: root | |
networks: | |
- wp-network | |
db: | |
image: mysql:5.7 | |
restart: always | |
volumes: | |
- db_data:/var/lib/mysql | |
environment: | |
MYSQL_ROOT_PASSWORD: root | |
networks: | |
- wp-network | |
phpmyadmin: | |
depends_on: | |
- db | |
image: phpmyadmin/phpmyadmin | |
restart: always | |
ports: | |
- 8080:80 | |
environment: | |
PMA_HOST: db | |
MYSQL_ROOT_PASSWORD: root | |
networks: | |
- wp-network | |
networks: | |
wp-network: | |
driver: bridge | |
volumes: | |
db_data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
index index.php index.html; | |
server_name localhost; | |
listen 443 ssl; | |
listen 80; | |
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 wordpress: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