title: Docker-compose re-write file for version 2 to version 1
body: <p>I have an elk docker-compose file that I think cannot run on my server because the docker-compose version is too old...</p>
  
  <pre><code>$ docker-compose -version
  docker-compose version 1.6.2, build 4d72027
  </code></pre>
  
  <p>And here is my docker-compose file...</p>
  
  <pre><code>version: '2'
  services:
      elasticsearch:
        image: elasticsearch:5
        command: elasticsearch
        environment:
          # This helps ES out with memory usage
          - ES_JAVA_OPTS=-Xmx1g -Xms1g
        volumes:
          # Persist elasticsearch data to a volume
          - elasticsearch:/usr/share/elasticsearch/data
          # Extra ES configuration options
          - ./es/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
        ports:
          - "9200:9200"
          - "9300:9300"
  
      logstash:
        image: logstash:5
        command: logstash -w 4 -f /etc/logstash/conf.d/logstash.conf
        environment:
          # This helps Logstash out if it gets too busy
          - LS_HEAP_SIZE=2048m
        volumes:
          # volume mount the logstash config
          - ./logstash/logstash.conf:/etc/logstash/conf.d/logstash.conf
          - /Users/rriviere/workspace/parks-dpe/activities-api-v1/app-logs/:/tmp/app-logs
        ports:
          # GELF port for Docker logs
          - "12201:12201/udp"
          # UDP port for syslogs
          - "5000:5000/udp"
          # Default TCP port
          - "5001:5001"
        links:
          - elasticsearch
  
      kibana:
        image: kibana:5
        environment:
          # Point Kibana to the elasticsearch container
          - ELASTICSEARCH_URL=http://elasticsearch:9200
        ports:
          - "5601:5601"
        links:
          - elasticsearch
  
      kopf:
        image: rancher/kopf:v0.4.0
        ports:
          - "8080:80"
        environment:
          KOPF_ES_SERVERS: "elasticsearch:9200"
        links:
          - elasticsearch
  
  volumes:
    elasticsearch:
  </code></pre>
  
  <p>Whilst I'm not looking for an exact answer here can someone help me with what is required to create myself a docker compose v1 file that would do the same things. </p>
  
  <p>thanks</p>