docker-stack.yml 740 B

1234567891011121314151617181920212223242526272829303132333435
  1. # stack 不支持基于第2版写的docker-compose.yml ,version版本至少为3
  2. version: '3'
  3. services:
  4. redis:
  5. image: redis
  6. # ports:
  7. # - 6379:6379
  8. restart: always
  9. deploy:
  10. replicas: 2
  11. api:
  12. restart: on-failure
  13. depends_on:
  14. - interlock_redis
  15. image: registry.cn-hangzhou.aliyuncs.com/interlock/api:1.0
  16. # ports:
  17. # - 8520:8520
  18. deploy:
  19. replicas: 2
  20. # environment:
  21. # - BACKEND_URL=http://interlockapi:8520
  22. ui:
  23. restart: on-failure
  24. depends_on:
  25. - interlock_api
  26. image: registry.cn-hangzhou.aliyuncs.com/interlock/ui:1.0
  27. ports:
  28. - 8092:8092
  29. deploy:
  30. replicas: 3
  31. # volumes:
  32. # - ./nginx.conf:/etc/nginx/nginx.conf