docker-compose.local.yml 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. services:
  2. api:
  3. build:
  4. context: ..
  5. dockerfile: deploy/Dockerfile.api
  6. container_name: spider_api
  7. ports:
  8. - "8200:8080"
  9. volumes:
  10. - ../configs:/app/configs
  11. - ../sessions:/app/sessions
  12. environment:
  13. - GIN_MODE=release
  14. - TG_SECRET_KEY=${TG_SECRET_KEY:-d9RkIHw7wLaa5Qx+B7/QOw5K6+bW67Ife4UK91h4Z2Q=}
  15. restart: unless-stopped
  16. healthcheck:
  17. test: ["CMD", "wget", "-q", "-O-", "http://localhost:8080/ping"]
  18. interval: 15s
  19. timeout: 5s
  20. retries: 3
  21. start_period: 120s
  22. networks:
  23. - chat_im_network
  24. web:
  25. build:
  26. context: ..
  27. dockerfile: deploy/Dockerfile.web
  28. container_name: spider_web
  29. ports:
  30. - "8300:80"
  31. depends_on:
  32. api:
  33. condition: service_healthy
  34. restart: unless-stopped
  35. healthcheck:
  36. test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1/"]
  37. interval: 30s
  38. timeout: 5s
  39. retries: 3
  40. networks:
  41. - chat_im_network
  42. networks:
  43. chat_im_network:
  44. external: true