Skip to content

Commit 16dbe9b

Browse files
committed
adding mysql
1 parent 6660ab3 commit 16dbe9b

File tree

5 files changed

+17
-13
lines changed

5 files changed

+17
-13
lines changed

database/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM mysql:8.0.23
2+
CMD ["mysqld"]
3+
EXPOSE 3306

database/data/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

docker-compose.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
version: '3'
22

33
services:
4-
# database:
5-
# build:
6-
# context: ./database
4+
database:
5+
build:
6+
context: ./database
77
# environment:
88
# - MYSQL_DATABASE=${DATABASE_NAME}
99
# - MYSQL_USER=${DATABASE_USER}
1010
# - MYSQL_PASSWORD=${DATABASE_PASSWORD}
1111
# - MYSQL_ROOT_PASSWORD=${DATABASE_ROOT_PASSWORD}
12-
# ports:
13-
# - "3306:3306"
14-
# volumes:
15-
# - ./database/init.sql:/docker-entrypoint-initdb.d/init.sql
16-
# - ./database/data:/var/lib/mysql
12+
ports:
13+
- "3306:3306"
14+
volumes:
15+
#- ./database/init.sql:/docker-entrypoint-initdb.d/init.sql
16+
- ./database/data:/var/lib/mysql
1717

1818
php-fpm:
1919
build:
2020
context: ./php-fpm
21-
# depends_on:
22-
# - database
21+
depends_on:
22+
- database
2323
# environment:
2424
# - APP_ENV=${APP_ENV}
2525
# - APP_SECRET=${APP_SECRET}

src/index.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
hola!
1+
<?php
2+
phpinfo();

src/phpinfo.php

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)