Skip to content

Instantly share code, notes, and snippets.

@mbenedettini
Created February 28, 2017 22:38
Show Gist options
  • Save mbenedettini/075e5fed8e3d22fd4b7b9dba4f9281fc to your computer and use it in GitHub Desktop.
Save mbenedettini/075e5fed8e3d22fd4b7b9dba4f9281fc to your computer and use it in GitHub Desktop.
version: '2'
services:
db:
image: mariadb
volumes:
- /storage/example/db:/var/lib/mysql
restart: always
env_file: .env
environment:
- MYSQL_DATABASE=wordpress
- MYSQL_USER=wordpress
wordpress:
depends_on:
- db
image: wordpress:latest
links:
- db
restart: always
volumes:
- /storage/example/wp-content:/var/www/html/wp-content
env_file: .env
environment:
- VIRTUAL_HOST=example.codexia.io
- WORDPRESS_DB_USER=wordpress
- WORDPRESS_DB_HOST=db:3306
networks:
default:
external:
name: nginx-proxy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment