Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.