Created
September 15, 2022 20:24
-
-
Save Broasca/9b0e138e4b7d933468559b9d4387ec3a to your computer and use it in GitHub Desktop.
Docker composer MySQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.8" | |
services: | |
# Mysql service | |
mysql: | |
image: mysql:8.0 | |
platform: linux/x86_64 | |
container_name: app-mysql | |
command: --default-authentication-plugin=mysql_native_password | |
restart: always | |
environment: | |
- MYSQL_DATABASE=dev | |
- MYSQL_ROOT_PASSWORD=root | |
- MYSQL_USER=app | |
- MYSQL_PASSWORD=apppass | |
volumes: | |
- ./docker/mysql/my.cnf:/etc/mysql/conf.d/my.cnf | |
- ./docker/mysql/data:/var/lib/mysql | |
ports: | |
- 8982:3306 | |
networks: | |
- app-network | |
networks: | |
app-network: | |
driver: bridge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nice