Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Commit

Permalink
Enable configurable server port
Browse files Browse the repository at this point in the history
  • Loading branch information
derekmckinnon committed Jan 25, 2024
1 parent 074d6f9 commit 0e52baf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM nginx:alpine
FROM nginx:1.25-alpine

COPY default.conf /etc/nginx/conf.d/default.conf
ENV NGINX_PORT=80

COPY default.conf.template /etc/nginx/templates/default.conf.template
COPY *.html /etc/nginx/html/
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
ECS Placeholder
===============
# ECS Placeholder

The purpose of this project is to provide a placeholder image with a `/health` HTTP endpoint for use with AWS ECS and Terraform.

Since Terraform is primarily an infrastructure management tool and not an application deployment tool, coupling ECS metadata
such as task definition files to Terraform makes for complex deployment scenarios. Often times we just want to have Terraform
create the service and deploy new ECS task definition versions independently. Since ECS requires *some* kind of image to be
create the service and deploy new ECS task definition versions independently. Since ECS requires _some_ kind of image to be
referenced, this is where this image comes in.

## Configuration

| Environment Variable | Description | Default |
| -------------------- | ------------------------------------------------------------- | ------- |
| `NGINX_PORT` | Controls the port on which the server listens for requests on | `80` |
2 changes: 1 addition & 1 deletion default.conf → default.conf.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
server {
listen 80;
listen ${NGINX_PORT};

location / {
try_files /index.html /index.html;
Expand Down

0 comments on commit 0e52baf

Please sign in to comment.