Ajout de mySQL

Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
Florian Bouillon 2020-02-11 16:08:34 +01:00
parent fc0515a2d0
commit 71fa5f1d53
No known key found for this signature in database
GPG Key ID: B143FF27EF555D16
2 changed files with 33 additions and 2 deletions

View File

@ -1,5 +1,9 @@
version: "3" version: "3"
services: services:
mariadb:
ports:
- "127.0.0.1:3307:3306"
php: php:
image: project image: project
build: build:
@ -12,3 +16,16 @@ services:
ports: ports:
- "127.0.0.1:8000:8000" - "127.0.0.1:8000:8000"
command: "php artisan serve --host=0.0.0.0 --port=8000" command: "php artisan serve --host=0.0.0.0 --port=8000"
# run phpmyadmin to debug mysql
phpmyadmin:
image: phpmyadmin/phpmyadmin
environment:
- PMA_HOST=mariadb
- PMA_PORT=3306
- PMA_USER=root
- PMA_PASSWORD=4sfdg64s89g4sfd6g84sd6g45
ports:
- 8101:80
networks:
- studiomoto

View File

@ -5,3 +5,17 @@ services:
build: build:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile
mariadb:
image: mariadb
environment:
- MYSQL_ROOT_PASSWORD=4sfdg64s89g4sfd6g84sd6g45
- MYSQL_DATABASE=stm
- MYSQL_USER=stm
- MYSQL_PASSWORD=stm
networks:
- studiomoto
networks:
studiomoto:
external: false