Minimal NGINX container serving "Hello World!" with health checks. Portable across Docker, Kubernetes (Helm), AWS ECS, Azure ACI, and GCP Cloud Run.
docker build -t nginx-hello-world .
docker run -d -p 8080:8080 nginx-hello-world
curl http://localhost:8080
# Hello World!
curl http://localhost:8080/health
# (200 OK)| Variable | Default | Descripción |
|---|---|---|
PORT |
8080 |
Puerto donde escucha NGINX |
helm install nginx-hello-world ./charts/nginx-hello-world| Parámetro | Default | Descripción |
|---|---|---|
replicaCount |
1 |
Número de pods |
image.repository |
nginx-hello-world |
Imagen Docker |
image.tag |
latest |
Tag de imagen |
image.pullPolicy |
IfNotPresent |
Política de pull |
service.type |
ClusterIP |
Tipo de Service |
service.port |
8080 |
Puerto del Service |
ingress.enabled |
false |
Habilitar Ingress |
ingress.className |
nginx |
Clase Ingress |
ingress.hosts |
[] |
Hosts |
resources |
{} |
Recursos CPU/memoria |
probes.liveness.initialDelaySeconds |
5 |
Liveness probe delay |
probes.readiness.initialDelaySeconds |
5 |
Readiness probe delay |
Ver values.yaml para valores completos.
aws ecs register-task-definition \
--cli-input-json file://deploy/ecs/task-definition.json \
--region us-east-1Reemplazar {{IMAGE_URI}}, {{AWS_REGION}}, {{EXECUTION_ROLE_ARN}} en el JSON antes de ejecutar.
az container create \
--resource-group mi-rg \
--file deploy/azure/aci-deploy.yamlReemplazar {{IMAGE_URI}}, {{RESOURCE_GROUP}}, {{LOCATION}} en el YAML antes de ejecutar.
gcloud run services replace deploy/gcp/cloud-run-service.yaml \
--project={{PROJECT_ID}} \
--region={{REGION}}Reemplazar {{IMAGE_URI}}, {{PROJECT_ID}}, {{REGION}} en el YAML antes de ejecutar.
Ver CHANGELOG.md.