I have the following docker compose file:
GNU nano 6.2 docker-compose.yml version: '3'services: urgent-fury-pre-prod: image: leonhard8/urgent-fury:latest depends_on: - redis restart: always ports: - '1:1' networks: - external environment: stage: "pre-prod" deploy: replicas: 1 restart_policy: condition: on-failure redis: image: "redis:alpine" restart: always ports: - '6379:6379' networks: - externalnetworks: external: external: true
I use Redis using Java Jedis.
final Jedis jedis = new Jedis();
However everytime I try to run docker-compose the connection times out.
- Google the issue
- Ask ChatGPT multiple times
- Read the docker documentation