Skip to content

Instantly share code, notes, and snippets.

@Matheus-de-Souza
Last active March 13, 2020 11:48
Show Gist options
  • Save Matheus-de-Souza/b5d5eb8c8f101f026aaede0a244bde01 to your computer and use it in GitHub Desktop.
Save Matheus-de-Souza/b5d5eb8c8f101f026aaede0a244bde01 to your computer and use it in GitHub Desktop.
Wordpress + Docker
version: '2'
services:
db:
image: mysql:5.7
volumes:
- ./data/mysql-db:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: 12345678
MYSQL_DATABASE: wordpress
MYSQL_USER: usuario_banco
MYSQL_PASSWORD: 12345678
wordpress:
depends_on:
- db
build: .
volumes:
- ./src/wordpress/:/var/www/html/
ports:
- "80:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: usuario_banco
WORDPRESS_DB_PASSWORD: 12345678
volumes:
db_data:
FROM wordpress:latest
RUN chown -Rf www-data.www-data /var/www/html/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment