Last active
October 19, 2019 08:55
-
-
Save theconsolelogger/e03cfd0a91566d382f300d3853b63ffb to your computer and use it in GitHub Desktop.
A Docker Compose file for running a Laravel Docker image with a MySQL database.
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.7" | |
services: | |
api: | |
image: docker.pkg.github.com/jonathanstaniforth/laravel-docker/laravel-mysql:v1.1 | |
ports: | |
- 80:80 | |
- 443:443 | |
volumes: | |
- ./:/var/www/laravel | |
depends_on: | |
- database | |
networks: | |
- overlay | |
database: | |
image: mysql | |
command: --default-authentication-plugin=mysql_native_password | |
environment: | |
MYSQL_ROOT_PASSWORD: <root_password> | |
MYSQL_USER: <user_name> | |
MYSQL_PASSWORD: <user_password> | |
MYSQL_DATABASE: <database_name | |
volumes: | |
- type: bind | |
source: ./dbdata | |
target: /var/lib/mysql | |
ports: | |
- 3306:3306 | |
networks: | |
- overlay | |
networks: | |
overlay: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment