diff --git a/config/config.ini.example b/config/config.ini.example new file mode 100644 index 0000000000000000000000000000000000000000..b20239398d3b08630cf41298f0ca5e0cf169fb44 --- /dev/null +++ b/config/config.ini.example @@ -0,0 +1 @@ +driver= \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index bfb5d4edf11f42228d8614b8248167af9083c1f4..0da233d28238b34e31cec5d82485de9f8b78b523 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,9 @@ -version: '3.8' + + +networks: + net: + driver: bridge + services: php: build: './docker/php' @@ -7,4 +12,14 @@ services: - ${PHP_PORT:-8080}:80 volumes: - ./:/var/www/html - command: php -S 0.0.0.0:80 -t . \ No newline at end of file + command: php -S 0.0.0.0:80 -t . + networks: + - net + + db: + image: mysql:latest + networks: + - net + env_file: sql/db.env + volumes: + - ./sql:/docker-entrypoint-initdb.d diff --git a/apikey.sql b/sql/apikey.sql similarity index 100% rename from apikey.sql rename to sql/apikey.sql diff --git a/bdd.sql b/sql/bdd.sql similarity index 100% rename from bdd.sql rename to sql/bdd.sql diff --git a/sql/db.env.exemple b/sql/db.env.exemple new file mode 100644 index 0000000000000000000000000000000000000000..23a60a9886ddb73d288c6c7a1ff75ff38c58cea2 --- /dev/null +++ b/sql/db.env.exemple @@ -0,0 +1,4 @@ +MYSQL_ROOT_PASSWORD=rootpassword +MYSQL_DATABASE=mydatabase +MYSQL_USER=myuser +MYSQL_PASSWORD=mypassword \ No newline at end of file diff --git a/insert.sql b/sql/insert.sql similarity index 100% rename from insert.sql rename to sql/insert.sql