在哪里可以找到Sonatype Nexus(例如:/ nexus),MongoDB,Postgres,Jenkins等的默认路径,以便使用Application Load Balancer从AWS ECS安装Docker容器?我需要创建一个新的目标组并在健康检查设置路径中添加路径,以便我可以对所有应用程序进行负载平衡,例如Sonatype Nexus,Jenkins,Centos,Postgres,MongoDB等。
答案 0 :(得分:1)
一般来说,具有Web应用程序的docker容器按惯例按“/”部署,而加入webapp更多的是port
而非path
的问题。
您可以在官方码头中心或商店网站上找到有关端口的信息(nexus,jenkins等等。)
| Path | Port | Docker run example
Nexus 3 | / | 8081 | docker run -p8081:8081 --name nexus sonatype/nexus3
Jenkins | / | 8080 | docker run -p8080:8080 --name jenkins jenkins
对于您的数据库,同样的想法,您没有指定连接到它们的“路径”。您只需要映射ports
和publish
个,link
容器,或使用泊坞窗network
。
例如postgres:
docker run --name some-postgres -p5432:5432 -e POSTGRES_PASSWORD=mysecretpassword -d postgres
然后使用以下内容加入数据库:
//host:5432/db
您的AWS ELB将使用目标组(HTTP / HTTPS)平衡 webapps 的流量,但我认为您不能为数据库(仅限TCP)执行此操作。
我猜数据库会使用Classic Load Balancer
。