title: docker-compose - externalize spring application.properties
body: <p>I have a spring boot application that connects to a mongo db and deployed the app with docker.  I am using this docker-compose.yml file, which works fine:</p>
  
  <pre><code>version: '2'
  services:
    db:
        container_name: app-db
        image: mongo
        volumes:
          - /data/db:/data/db
        ports:
          - 27017:27017
    web:
      container_name: spring-app
      image: spring-app
      depends_on:
        - db
      environment:
        SPRING_DATA_MONGODB_URI: mongodb://db:27017/appDB
        SPRING_DATA_MONGODB_HOST: db
      ports:
        - 8080:8080
  </code></pre>
  
  <p>Currently, the app is using the application.properties file embedded in the spring app docker image (spring-app).  How do I externalize / pass-in the application.properties file using docker-compose?</p>
  
  <p>Thank you for your help</p>