Skip to content

Instantly share code, notes, and snippets.

@soyFelixBarros
Last active April 28, 2021 13:34
Show Gist options
  • Save soyFelixBarros/e887c0d15929af6d3a283f6fed01c049 to your computer and use it in GitHub Desktop.
Save soyFelixBarros/e887c0d15929af6d3a283f6fed01c049 to your computer and use it in GitHub Desktop.
Configuración Docker Compose para WordPress
version: "3.1"
services:
wordpress:
image: wordpress
restart: always
ports:
- 8085:80
container_name: project-wordpress
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: exampleuser
WORDPRESS_DB_PASSWORD: examplepass
WORDPRESS_DB_NAME: exampledb
volumes:
- ./plugins/:/var/www/html/wp-content/plugins/ # Plugin development
- ./themes/:/var/www/html/wp-content/themes/ # Theme development
db:
image: mysql:5.7
restart: always
container_name: project-mysql
environment:
MYSQL_DATABASE: exampledb
MYSQL_USER: exampleuser
MYSQL_PASSWORD: examplepass
MYSQL_RANDOM_ROOT_PASSWORD: '1'
volumes:
- db:/var/lib/mysql
volumes:
wordpress:
db:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment