Adminer (MySQL)
Codes
version: '3.1'
services:
mysql:
image: mysql:8.0
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
networks:
- app-tier
ports:
- 3306:3306
adminer:
image: adminer:4.7
restart: always
networks:
- app-tier
ports:
- 8080:8080
depends_on:
- mysql
networks:
app-tier:
driver: bridge
.env:
MYSQL_ROOT_PASSWORD=secret
MYSQL_DATABASE=example
MYSQL_USER=devuser
MYSQL_PASSWORD=secret
Load database:
$ docker-compose up -d
$ docker-compose ps
Name Command State Ports
------------------------------------------------------------------------------------
adminer entrypoint.sh docker-php-e ... Up 0.0.0.0:8080->8080/tcp
mysql docker-entrypoint.sh --def ... Up 0.0.0.0:3306->3306/tcp, 33060/tcp