Created
May 3, 2021 23:03
-
-
Save sherwinmartin/19540edb12f7325eb94c987ebe4d3d40 to your computer and use it in GitHub Desktop.
add mysql and phpmyadmin to sail docker file
This file contains 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
mysql: | |
platform: linux/x86_64 | |
image: 'mysql:8.0' | |
ports: | |
- '${FORWARD_DB_PORT:-3306}:3306' | |
environment: | |
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}' | |
MYSQL_DATABASE: '${DB_DATABASE}' | |
MYSQL_USER: '${DB_USERNAME}' | |
MYSQL_PASSWORD: '${DB_PASSWORD}' | |
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' | |
volumes: | |
- 'sailmysql:/var/lib/mysql' | |
networks: | |
- sail | |
healthcheck: | |
test: ["CMD", "mysqladmin", "ping"] | |
phpmyadmin: | |
image: phpmyadmin/phpmyadmin | |
ports: | |
- 8080:80 | |
environment: | |
MYSQL_USERNAME: "${DB_USERNAME}" | |
MYSQL_ROOT_PASSWORD: "${DB_PASSWORD}" | |
PMA_HOST: mysql | |
networks: | |
- sail |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment