Skip to content

Instantly share code, notes, and snippets.

@josemalcher
Forked from gabrielfroes/Dockerfile
Created May 30, 2019 02:15
Show Gist options
  • Save josemalcher/c372e3fee8ed27eb0d7e0738f5121860 to your computer and use it in GitHub Desktop.
Save josemalcher/c372e3fee8ed27eb0d7e0738f5121860 to your computer and use it in GitHub Desktop.
Docker + VS Code #CDFTV #MaoNoCodigo3
version: '3.3'
services:
wordpress_db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: myrootpass
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
wordpress:
depends_on:
- wordpress_db
image: wordpress:latest
ports:
- "80:80"
- "443:443"
restart: always
environment:
WORDPRESS_DB_HOST: wordpress_db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
phpmyadmin:
depends_on:
- wordpress_db
image: phpmyadmin/phpmyadmin
restart: always
ports:
- 88:80
environment:
PMA_HOST: wordpress_db:3306
MYSQL_ROOT_PASSWORD: myrootpass
volumes:
db_data:
php:
build: .
ports:
- "80:80"
- "443:443"
volumes:
- ./www/:/var/www/html
links:
- db
db:
image: mysql:5.7
volumes:
- /var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=myrootpass
- MYSQL_DATABASE=mydatabase
FROM php:7.2-apache
RUN docker-php-ext-install mysqli
RUN a2enmod rewrite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment