Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "[Issue 591 healthcheck (#592)" #598

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ RUN poetry install --no-root --with dev

COPY . /api

COPY --from=ghcr.io/tarampampam/curl:8.1.1 /bin/curl /bin/curl

# Set the host to 0.0.0.0 to make the server available external
# to the Docker container that it's running in.
ENV HOST=0.0.0.0
Expand Down Expand Up @@ -100,8 +98,6 @@ RUN poetry install --no-root --only main
# or the application will not build
RUN poetry build --format wheel && poetry run pip install 'dist/grants_equity_api-0.1.0-py3-none-any.whl'

COPY --from=ghcr.io/tarampampam/curl:8.1.1 /bin/curl /bin/curl

# Add project's virtual env to the PATH so we can directly run poetry scripts
# defiend in pyproject.toml
ENV PATH="/api/.venv/bin:$PATH"
Expand Down
17 changes: 0 additions & 17 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,6 @@ services:
restart: always
ports:
- 3000:3000
healthcheck:
# CMD-SHELL runs on the default shell client, ie /bin/sh
# CMD runs the command directly
test: ["CMD",
"curl",
"--fail",
"-sLo",
"/dev/null",
"-w",
"%{http_code}",
"http://localhost:3000/health"
]
interval: 60s
timeout: 5s
retries: 3
start_period: 20s


storybook:
container_name: storybook
Expand Down
4 changes: 0 additions & 4 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ COPY src ./src
COPY stories ./stories
COPY .storybook ./.storybook

COPY --from=ghcr.io/tarampampam/curl:8.1.1 /bin/curl /bin/curl

ENV NEXT_TELEMETRY_DISABLED 1

CMD ["npm", "run", "dev"]
Expand Down Expand Up @@ -88,8 +86,6 @@ RUN adduser --system --uid 1001 nextjs
RUN chown nextjs:nodejs /frontend/.next/cache/images/
USER nextjs

COPY --from=ghcr.io/tarampampam/curl:8.1.1 /bin/curl /bin/curl

COPY --from=builder /frontend/public ./public

# Automatically leverage output traces to reduce image size
Expand Down
10 changes: 2 additions & 8 deletions infra/modules/service/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,8 @@ resource "aws_ecs_task_definition" "app" {
interval = 30,
retries = 3,
timeout = 5,
command = ["CMD",
"curl",
"--fail",
"-sLo",
"/dev/null",
"-w",
"%%{http_code}",
"http://localhost:8000/health"
command = ["CMD-SHELL",
"wget --no-verbose --tries=1 --spider http://localhost:${var.container_port}/health || exit 1"
]
},
environment = local.environment_variables,
Expand Down