Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions database/trials.sql
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ CREATE TABLE IF NOT EXISTS `trials` (
`cookies` varchar(5) DEFAULT NULL,
`platform` varchar(30) NOT NULL,
`appCodeName` varchar(30) NOT NULL,
`appVersion` varchar(15) DEFAULT NULL,
`appVersion` text DEFAULT NULL,
`product` varchar(30) NOT NULL,
`browser` varchar(20) DEFAULT NULL,
`webgl` varchar(4) DEFAULT NULL,
`timeDate` varchar(40) NOT NULL,
`timeDate` text NOT NULL,
`timeWelcome` bigint(20) DEFAULT NULL,
`timeStart` bigint(20) DEFAULT NULL,
`timeEnd` bigint(20) DEFAULT NULL,
Expand Down
35 changes: 35 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
version: '3'

services:

# database
database:
image: mysql:latest
restart: always
volumes:
- ./database/trials.sql:/docker-entrypoint-initdb.d/trials.sql
environment:
MYSQL_DATABASE: facemaker
MYSQL_ALLOW_EMPTY_PASSWORD: 'true'

# phpmyadmin
phpmyadmin:
depends_on:
- database
image: phpmyadmin/phpmyadmin:latest
restart: always
ports:
- '8000:80'
environment:
PMA_HOST: database

# webserver
web:
depends_on:
- database
build: ./web
restart: always
ports:
- '8080:80'
volumes:
- ./web:/var/www/html/
3 changes: 3 additions & 0 deletions web/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM php:apache

RUN docker-php-ext-install mysqli
2 changes: 1 addition & 1 deletion web/php/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
or die ("Connection could be established");
//echo "choosing local db<p></p>";
} else {
$connection = mysqli_connect("HOSTNAME", "USERNAME", "PASSWORD", "DATABASENAME")
$connection = mysqli_connect("database", "root", "", "facemaker")
or die ("Connection could be established");
//echo "choosing online db<p></p>";
}
Expand Down