Difference between production and development docker using
<p>I want to try docker for my web-site. I use <code>php, nginx, mysql</code>. I've configured docker and I've run my website locally. Now I want to publish my web-site to production.
I have few difference between developer and production version:  </p>

<ul>
<li>I need to be able connect to mysql inside container in developer mode (for debugging), but in production mode mysql must be isolated from outside for security</li>
<li>I want open my web-site by address app.dev and use nginx-proxy image on my developer machine, but on production I will not use nginx-proxy for increase performance.</li>
</ul>

<p>Could I run docker with one docker-compose.yml file? 
Or should I create two version of docker-compose file for developer and production version? But in this case I lose advantage of docker - same enviroment evrywhere. If I change docker-compose-dev.yml, I need to remember to change docker-compose-prod.yml.</p>

<p><strong>My docker-compose.yml:</strong></p>

<pre><code>version: '2'
services:
    app:
        build: .
        volumes:
         - ./app:/app
        container_name: app
    app_nginx:
        image: nginx
        ports:
         - "8080:80"
        container_name: app_nginx
        volumes:
            - ./data/nginx:/etc/nginx/conf.d
            - ./app:/app
        environment:
         - VIRTUAL_HOST=app.dev
    app_db:
        image: mysql:5.7
        volumes:
          - "./data/db:/var/lib/mysql"
        restart: always
        environment:
            MYSQL_ROOT_PASSWORD:
            MYSQL_ALLOW_EMPTY_PASSWORD: 1
            MYSQL_DATABASE: "app_db"
        container_name: app_db  
    nginx-proxy:
        image: jwilder/nginx-proxy
        container_name: nginx-proxy
        ports:
          - "80:80"
        volumes:
          - /var/run/docker.sock:/tmp/docker.sock:ro
</code></pre>