diff --git a/docker-compose.yml b/docker-compose.yml index f6a6772..1990665 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,6 +4,8 @@ services: context: ./devices-api dockerfile: Dockerfile container_name: handheld-api + networks: + - handheld-net ports: - "8080:8080" volumes: @@ -24,15 +26,17 @@ services: - REDIS_HOST=redis - REDIS_PORT=6379 healthcheck: - test: ["CMD-SHELL", "wget -q -O - http://localhost:8080/health/ready || exit 1"] - interval: 10s + test: ["CMD-SHELL", "wget -q -O - http://localhost:8080/health/live || exit 1"] + interval: 5s timeout: 5s - retries: 3 - start_period: 10s + retries: 10 + start_period: 30s postgres: image: postgres:15-alpine container_name: handheld-postgres + networks: + - handheld-net ports: - "5432:5432" environment: @@ -51,6 +55,8 @@ services: redis: image: redis:7-alpine container_name: handheld-redis + networks: + - handheld-net ports: - "6379:6379" healthcheck: @@ -64,6 +70,8 @@ services: context: ./frontend dockerfile: Dockerfile container_name: handheld-frontend + networks: + - handheld-net ports: - "8090:8090" env_file: @@ -85,6 +93,8 @@ services: context: ./devices-worker dockerfile: Dockerfile container_name: handheld-worker + networks: + - handheld-net volumes: - ./devices-worker:/app env_file: @@ -107,3 +117,7 @@ services: interval: 10s timeout: 3s retries: 3 + +networks: + handheld-net: + name: handheld-devices