Skip to content

Instantly share code, notes, and snippets.

@markmur
Last active November 18, 2021 22:21
Show Gist options
  • Save markmur/00299dee2983f0234cd19333787fc9ee to your computer and use it in GitHub Desktop.
Save markmur/00299dee2983f0234cd19333787fc9ee to your computer and use it in GitHub Desktop.
Cassandra & NodeJS (docker-compose)
services:
node-server:
build: .
ports:
- "3000:3000"
links:
- cassandra
depends_on:
cassandra:
condition: service_healthy
environment:
USERNAME: "cassandra"
PASSWORD: "cassandra"
PORT: 3000
NODE_ENV: "production"
networks:
- service
cassandra:
image: cassandra
ports:
- "9042:9042"
volumes:
- cassandra_data:/var/lib/cassandra
networks:
- service
healthcheck:
test: ["CMD-SHELL", "[ $$(nodetool statusgossip) = running ]"]
interval: 30s
timeout: 10s
retries: 5
volumes:
cassandra_data:
driver: local
networks:
service:
driver: "bridge"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment