Skip to content

Instantly share code, notes, and snippets.

@jasonfigueroa
Created August 1, 2021 02:23
Show Gist options
  • Save jasonfigueroa/78db9eb5797b3351007b44fb18eae956 to your computer and use it in GitHub Desktop.
Save jasonfigueroa/78db9eb5797b3351007b44fb18eae956 to your computer and use it in GitHub Desktop.
A docker-compose file for a local MySQL database.
version: '3.1'
services:
db:
image: mysql:latest
command: --default-authentication-plugin=mysql_native_password
volumes:
- mysql_data:/var/lib/mysql
restart: "no" # 'always' would start this service each time my machine is powered on
ports:
- 33060:3306
environment:
- MYSQL_ROOT_PASSWORD=rootpass
- MYSQL_DATABASE=Chinook
- MYSQL_USER=user
- MYSQL_PASSWORD=userpass
adminer:
image: adminer
restart: "no"
ports:
- 8088:8080
environment:
- ADMINER_DESIGN=pepa-linha
volumes:
mysql_data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment