version: '2' services: aaf_container: image: attos/aaf ports: - "8101:8101" links: - cassandra_container volumes: - ./wait_for_host_port.sh:/tmp/wait_for_host_port.sh - ./data2:/data - ./runaafcli.sh:/opt/app/aaf/authz-service/2.0.15/runaafcli.sh entrypoint: ["bash", "-c", "/tmp/wait_for_host_port.sh cassandra_container 9042; sleep 20; /bin/sh -c ./startup.sh"] environment: - CASSANDRA_CLUSTER=cassandra_container cassandra_container: image: cassandra:2.1.16 ports: - "7000:7000" - "7001:7001" - "9042:9042" - "9160:9160" volumes: - ./data:/data - ./wait_for_host_port.sh:/tmp/wait_for_host_port.sh entrypoint: ["bash", "-c", "(/tmp/wait_for_host_port.sh localhost 9042 cqlsh --file /data/init.cql -u cassandra -p cassandra localhost; cqlsh --file /data/ecomp.cql -u cassandra -p cassandra localhost) & (/docker-entrypoint.sh cassandra -f)"]