Skip to content

Commit 4da2b84

Browse files
committed
add docker-compose config with mysql and db setup
1 parent ff24d2f commit 4da2b84

File tree

5 files changed

+27
-0
lines changed

5 files changed

+27
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.vagrant
22
*.log
3+
dev-key.sh

docker-compose.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,28 @@ services:
66
- "8080:80"
77
volumes:
88
- "./src:/var/www/html/"
9+
environment:
10+
- DB_HOSTNAME=mysql
11+
- DB_NAME=phpgps
12+
- DB_USER=phpgps
13+
- DB_PASSWORD=password
14+
- DEV_KEY # set dev key here or set as envvar on local machine to passthrough
15+
networks:
16+
- test
17+
mysql:
18+
image: mysql/mysql-server:8.0
19+
hostname: mysql
20+
command: --default-authentication-plugin=mysql_native_password
21+
ports:
22+
- "3306:3306"
23+
environment:
24+
- MYSQL_ROOT_PASSWORD=root
25+
- MYSQL_DATABASE=phpgps
26+
- MYSQL_USER=phpgps
27+
- MYSQL_PASSWORD=password
28+
volumes:
29+
- "./sql:/docker-entrypoint-initdb.d/"
30+
networks:
31+
- test
32+
networks:
33+
test:
File renamed without changes.
File renamed without changes.

sql/DropTables.sql renamed to sql/DropTables.sql.disabled

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
-- Drops tables used in phpGPS
2+
-- Rename to .sql
23

34
drop table users;
45
drop table user_types;

0 commit comments

Comments
 (0)