Skip to content

Instantly share code, notes, and snippets.

@cloudjumper2000
Last active January 2, 2018 21:37
Show Gist options
  • Save cloudjumper2000/f7f139b3deed06d3219fc74557d946bc to your computer and use it in GitHub Desktop.
Save cloudjumper2000/f7f139b3deed06d3219fc74557d946bc to your computer and use it in GitHub Desktop.
Base docker-compose.yml
services:
db:
image: mariadb
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: site1db
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
container_name: maria_db
wordpress:
depends_on:
- db
image: wordpress:latest
expose:
- 80
restart: always
environment:
VIRTUAL_HOST: site1.com
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
container_name: site1.com
volumes:
db_data:
networks:
default:
external:
name: nginx-proxy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment