Skip to content

Instantly share code, notes, and snippets.

@yukihirai0505
Created May 16, 2018 07:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yukihirai0505/864479138a651d7bd7f8d4b81907931a to your computer and use it in GitHub Desktop.
Save yukihirai0505/864479138a651d7bd7f8d4b81907931a to your computer and use it in GitHub Desktop.
docker-compose.ymlでwordpressの環境構築
version: '2'
services:
db:
image: mysql:5.7
restart: always
environment:
MYSQL_ROOT_PASSWORD: {root-pass}
MYSQL_DATABASE: {db-name}
MYSQL_USER: {user-name}
MYSQL_PASSWORD: {user-password}
ports:
- "13306:3306"
volumes:
- "./datastore:/docker-entrypoint-initdb.d"
wordpress:
image: wordpress:latest
restart: always
environment:
MYSQL_HOST: "db"
MYSQL_PORT: "3306"
links:
- db
ports:
- "8888:80"
volumes:
- "./:/var/www/html"
depends_on:
- db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment