Last active
November 18, 2021 22:21
-
-
Save markmur/00299dee2983f0234cd19333787fc9ee to your computer and use it in GitHub Desktop.
Cassandra & NodeJS (docker-compose)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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