diff --git a/config/.env.example b/config/.env.example index d40d9751121d6668f40d239ec963de5045d647a5..3d73bf69b455353f4403206ecec7e8531fe709b7 100644 --- a/config/.env.example +++ b/config/.env.example @@ -1,12 +1,6 @@ -DB_HOST= -DB_USER= -DB_PASSWORD= -DB_NAME= - -# FOR DOCKER -# DB_HOST=db -# DB_USER=php_docker -# DB_PASSWORD=password -# DB_NAME=php_docker -# SOAP_KEY=shortT_Key -# WSDL=http://soap-service:8080/ws/ \ No newline at end of file +DB_HOST=web-db +DB_USER=scholee +DB_PASSWORD=password +DB_NAME=scholee +SOAP_KEY=shortT_Key +WSDL=http://soap-service:8080/ws/ \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 5579c641d1fef215c2f37f5d8221be9a8a9ef334..5d484196550b68b6468da36b724d54521cd2650b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,28 +1,22 @@ version: '3.3' services: - db: - image: mysql:latest + web-db: + image: mysql:8.0 environment: - MYSQL_DATABASE=scholee - MYSQL_USER=scholee - - MYSQL_PASSWORD=password # this should live in a env var - - MYSQL_ALLOW_EMPTY_PASSWORD=1 # equivalent to True + - MYSQL_PASSWORD=password + - MYSQL_ALLOW_EMPTY_PASSWORD=1 volumes: - - "./db:/docker-entrypoint-initdb.d" # this is how we persist a sql db even when container stops - php-apache: + - "./db:/docker-entrypoint-initdb.d" + web-service: build: context: . dockerfile: Dockerfile image: php:8.0-apache volumes: - - ".:/var/www/html" # sync the current dir on local machine to the dir of container + - ".:/var/www/html" ports: - - 3000:80 # for future http traffic - - 443:443 # for future ssl traffic - phpmyadmin: - image: phpmyadmin/phpmyadmin - ports: - - 8001:80 - environment: - - PMA_HOST=db - - PMA_PORT=3306 \ No newline at end of file + - 3000:80 + depends_on: + - web-db