Skip to content

Instantly share code, notes, and snippets.

@msramdan
Forked from nicoavila/docker-compose.yml
Created May 25, 2022 23:11
Show Gist options
  • Save msramdan/251752e7bc5f560ebc42c23ba136d670 to your computer and use it in GitHub Desktop.
Save msramdan/251752e7bc5f560ebc42c23ba136d670 to your computer and use it in GitHub Desktop.
Docker Compose file for a MySQL 5.7 container
version: '3.3'
services:
database:
image: mysql:5.7
container_name: mysql
restart: always
environment:
MYSQL_DATABASE: 'db'
MYSQL_USER: 'user'
MYSQL_PASSWORD: 'password'
MYSQL_ROOT_PASSWORD: 'longa1986'
ports:
- '3306:3306'
expose:
- '3306'
volumes:
- './.mysql-data/db:/var/lib/mysql'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment