Here’s my app https://github.com/tenzan/testapp
It’s sample app that consists from:
- index.php
- nginx.conf
- sample.sql
I want to make a development environment in Docker
and I assume I will need to create 3 containers:
- The app itself (this is where
index.php
will reside) - Web server based on Nginx (this is where
nginx.conf
goes) - DB server based on MySQL (this is where
sample.sql
goes)
and link containers in the way:
- Application <–> Web server
- Application <–> DB server
Questions:
- If the thoughts above are correct?
- Will I have to create one
Dockerfile
per container or is it possible to create 3 containers with oneDockerfile
?
PS: I believe this work will be very helpful to other people so I will keep it accessible.