refactor(config): add network configuration and dependencies for inter-service communication
Some checks failed
build-and-push / lint (push) Failing after 8s
build-and-push / sonar (push) Has been skipped
build-and-push / docker (push) Has been skipped

- Configure flaresolverr and free-games-claimer to use a shared bridge network
- Explicitly set container name for flaresolverr and declare network dependency
- Define custom bridge network `fgc-network` for isolating service communication

This ensures services can reliably communicate over Docker's internal DNS while maintaining network separation from other containers.
This commit is contained in:
nocci 2026-03-08 13:22:01 +00:00
parent e0c97f8d7c
commit b14530537a

View file

@ -1,6 +1,7 @@
# start with `docker compose up` # start with `docker compose up`
services: services:
flaresolverr: flaresolverr:
container_name: flaresolverr
image: flaresolverr/flaresolverr:latest image: flaresolverr/flaresolverr:latest
ports: ports:
- "8191:8191" - "8191:8191"
@ -9,6 +10,8 @@ services:
- LOG_HTML=false - LOG_HTML=false
- CAPTCHA_SOLVER=none - CAPTCHA_SOLVER=none
restart: unless-stopped restart: unless-stopped
networks:
- fgc-network
free-games-claimer: free-games-claimer:
container_name: fgc # is printed in front of every output line container_name: fgc # is printed in front of every output line
@ -26,6 +29,14 @@ services:
# - NOTIFY='tgram://...' # - NOTIFY='tgram://...'
- EG_MODE=new - EG_MODE=new
- FLARESOLVERR_URL=http://flaresolverr:8191/v1 - FLARESOLVERR_URL=http://flaresolverr:8191/v1
networks:
- fgc-network
depends_on:
- flaresolverr
networks:
fgc-network:
driver: bridge
volumes: volumes:
fgc: fgc: