Docker Community Forums

Share and learn in the Docker community.

Is it Possible to use Php and Node js as back end in docker compose


(Ridhogillang) #1

Hi everyone! i want to ask is it possible to make two service using different languages in docker compose? so i want to make two different app. the first-service using php and the other service is using node js. thank you so much everyone :slight_smile:


(Siju Oommen George) #2

app1:
depends_on
-php

app2:
depends_on
-nodejs

Try this in your compose file.


(Sivasubramanian1) #3

Yes it is possible.

PHP:
image: image-name
container_name: php_container
ports:
- "80:80"
nodejs:
image: node-image
container: node_container
ports:
- “3000:3000”