Skip to content

Instantly share code, notes, and snippets.

@itoonx
Last active July 14, 2017 03:18
Show Gist options
  • Save itoonx/9f9c4357f139d7938c7a31b1344aa468 to your computer and use it in GitHub Desktop.
Save itoonx/9f9c4357f139d7938c7a31b1344aa468 to your computer and use it in GitHub Desktop.
version: '2'
services:
wordpress:
image: wordpress:4.8.0-php7.0-apache
volumes:
- ./src/public_html:/var/www/html
ports:
- "8000:80"
links:
- nginx
networks:
- frontend
restart: always
environment:
WORDPRESS_DB_HOST:{ip}
WORDPRESS_DB_NAME: {db_name}
WORDPRESS_DB_USER: {db_user}
WORDPRESS_DB_PASSWORD: {db_password}
nginx:
image: nginx
networks:
- frontend
volumes:
- ./src:/usr/share/nginx/html
environment:
- VIRTUAL_HOST_WEIGHT=2
- VIRTUAL_HOST=*/wp-content/*
networks:
frontend:
driver: bridge
volumes:
db_data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment