integration-tester:
  build: .
  command: s3
  links:
    - georocket_s3
    - s3

georocket_s3:
  image: georocket/georocket
  volumes:
    - ./conf/georocket_s3:/usr/local/georocket-server/conf
  links:
    - s3

s3:
  image: scality/s3server:mem-latest
  # Allow s3 server to be accessed through the "s3" domain name.
  # If we don't add the domain name to the config file the server will
  # fail with an authentication error.
  command: bash -c "cp /usr/src/app/config.json /usr/src/app/config2.json && cat /usr/src/app/config2.json | python -c 'import sys, json; j = json.load(sys.stdin); j[\"regions\"][\"specifiedregion\"] = [\"s3\"]; print json.dumps(j)' | python -m json.tool > /usr/src/app/config.json && npm start"

integration-tester:
  build: .
  command: s3
  links:
    - georocket_s3
    - s3

georocket_s3:
  image: georocket/georocket
  volumes:
    - ./conf/georocket_s3:/usr/local/georocket-server/conf
  links:
    - s3

s3:
  image: scality/s3server:mem-latest
  # Allow s3 server to be accessed through the "s3" domain name.
  # If we don't add the domain name to the config file the server will
  # fail with an authentication error.
  command: bash -c "node -e \"var conf = require('./config.json'), fs = require('fs'); conf.regions.specifiedregion = ['s3']; fs.writeFileSync('config.json', JSON.stringify(conf, undefined, 2));\" && npm start"

Use node to change s3server's conf file
Use node to change s3server's conf file

Python is not available in the latest s3server Docker image and
Node should be even more robust.
