Commit 2c486ca8 authored by Yankova, Liliya (UG - Computer Science)'s avatar Yankova, Liliya (UG - Computer Science)
Browse files

Added volumes for db container and exposed port

parent 7ea7b049
File added
......@@ -3,7 +3,11 @@ version: '3'
services:
db:
image: mysql:8.0
container_name: db
volumes:
- dbdata:/var/lib/mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ROOT_PASSWORD: advancedroot
MYSQL_DATABASE: userdb
......@@ -11,6 +15,8 @@ services:
MYSQL_PASSWORD: service_user
ports:
- "9906:3306"
expose:
- "9906"
web:
image: php:7.2.2-apache
container_name: php_web
......@@ -22,3 +28,6 @@ services:
- "8000:80"
stdin_open: true
tty: true
volumes:
dbdata:
\ No newline at end of file
<?php
//Database credentials
define('DB_SERVER', 'db');
define('DB_PORT', 9906);
define('DB_USERNAME', 'service_user');
define('DB_PASSWORD', 'service_user');
define('DB_NAME', 'userdb');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment