File tree Expand file tree Collapse file tree 4 files changed +8
-6
lines changed
infrastructure/applications Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,8 @@ ARG FUNCTION_DIR
140140
141141WORKDIR ${FUNCTION_DIR}
142142
143+ RUN apk add --no-cache curl
144+
143145RUN groupadd -r app && useradd -r -g app app && mkdir -p ${FUNCTION_DIR} && chown -R app:app ${FUNCTION_DIR}
144146
145147COPY --chown=app:app --from=js-stage ${FUNCTION_DIR}/dist/*.html ${FUNCTION_DIR}/custom_admin/templates/astro/
Original file line number Diff line number Diff line change @@ -28,10 +28,6 @@ resource "aws_ecs_task_definition" "traefik" {
2828 {
2929 name = " TRAEFIK_PROVIDERS_ECS_HEALTHYTASKSONLY" ,
3030 value = " true"
31- },
32- {
33- name = " TRAEFIK_PROVIDERS_ECS_REFRESHSECONDS" ,
34- value = " 1"
3531 }
3632 ]
3733
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ resource "aws_ecs_task_definition" "pretix" {
2525 retries = 3
2626 command = [
2727 " CMD-SHELL" ,
28- " curl -f http://127.0.0.1/healthcheck/ || exit 1"
28+ " curl --header 'Host: ${ local . alias } ' - f http://127.0.0.1/healthcheck/ || exit 1"
2929 ]
3030 timeout = 3
3131 interval = 10
Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ resource "aws_ecs_task_definition" "web" {
1818 dockerLabels = {
1919 " traefik.enable" = " true"
2020 " traefik.http.routers.backend-web.rule" = " PathPrefix(`/`)"
21+ " traefik.http.services.backend-web.loadbalancer.healthcheck.path" = " /health/"
22+ " traefik.http.services.backend-web.loadbalancer.healthcheck.interval" = " 5s"
23+ " traefik.http.services.backend-web.loadbalancer.healthcheck.timeout" = " 3s"
24+ " traefik.http.services.backend-web.loadbalancer.server.drain.duration" = " 15s"
2125 }
2226 environment = local.env_vars
2327
@@ -55,7 +59,7 @@ resource "aws_ecs_task_definition" "web" {
5559 interval = 10
5660 }
5761
58- stopTimeout = 300
62+ stopTimeout = 35
5963 }
6064 ])
6165
You can’t perform that action at this time.
0 commit comments