# Help with apache+php+mySql+node

**URL:** <https://forums.docker.com/t/help-with-apache-php-mysql-node/36794>\
**Category:** General\
**Created:** [August 19, 2017, 3:26pm UTC](https://forums.docker.com/t/help-with-apache-php-mysql-node/36794 "2017-08-19T15:26:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![msbir](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@msbir](https://forums.docker.com/u/msbir)\
**Post date:** [August 19, 2017, 3:26pm UTC](https://forums.docker.com/t/help-with-apache-php-mysql-node/36794/1 "2017-08-19T15:26:41Z")

</div>

Hi, I am new to Docker and right now I building my first app using PHP+APACHE+MYSQL.

I want to add node\_modules to the project and kind of lost my way with the process.

Right now I have this Dockerfile -

FROM php:7-apache  
RUN apt-get update -y && apt-get install -y libpng-dev && apt-get install -y libcurl4-openssl-dev  
RUN docker-php-ext-install pdo pdo\_mysql gd curl  
RUN a2enmod rewrite  
RUN service apache2 restart

And this docker-compose.yml

version: ‘2’

services:  
webserver:  
build: ./docker/webserver  
image: myimage  
ports:  
- “80:80”  
- "443:443"  
volumes:  
- /Users/username/Sites:/var/www/html  
links:  
- db

db:  
image: mysql:5.7  
ports:  
- "3306:3306"  
volumes:  
- ./db:/var/lib/mysql  
environment:  
- MYSQL\_ROOT\_PASSWORD=password  
- MYSQL\_DATABASE=dbname

My question is, what and where do I need to configure to make everything work together?  
Thank you!

---

<div class="post-metadata">

**Author:** ![think](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/think/32/14641_2.png) [@think](https://forums.docker.com/u/think)\
**Post date:** [August 20, 2017, 7:51am UTC](https://forums.docker.com/t/help-with-apache-php-mysql-node/36794/2 "2017-08-20T07:51:34Z")

</div>

looks already quite okay.  
did you configure your Apache/PHP that the mysql database is reachable under name “db”?
