Browse Source

bug-fix build

imwald
Silberengel 1 week ago
parent
commit
2a32dd4bfd
  1. 5
      Dockerfile
  2. 8
      compose.yaml

5
Dockerfile

@ -19,6 +19,7 @@ VOLUME /app/var/
# hadolint ignore=DL3008 # hadolint ignore=DL3008
RUN apt-get update && apt-get install -y --no-install-recommends \ RUN apt-get update && apt-get install -y --no-install-recommends \
acl \ acl \
curl \
file \ file \
gettext \ gettext \
git \ git \
@ -55,7 +56,9 @@ COPY --link frankenphp/Caddyfile /etc/caddy/Caddyfile
ENTRYPOINT ["docker-entrypoint"] ENTRYPOINT ["docker-entrypoint"]
HEALTHCHECK --start-period=60s CMD curl -f http://localhost:2019/metrics || exit 1 # Hit the public HTTP server, not Caddy :2019 admin (not always available the same way in all setups).
HEALTHCHECK --interval=10s --timeout=5s --retries=6 --start-period=120s \
CMD curl -fsS http://127.0.0.1/ -o /dev/null || exit 1
CMD [ "frankenphp", "run", "--config", "/etc/caddy/Caddyfile" ] CMD [ "frankenphp", "run", "--config", "/etc/caddy/Caddyfile" ]
# Dev FrankenPHP image # Dev FrankenPHP image

8
compose.yaml

@ -4,6 +4,14 @@ services:
build: build:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile
# Overrides Dockerfile HEALTHCHECK: verify Caddy/FrankenPHP serves the app (not Caddy :2019 admin,
# which is unreliable for “ready”). `docker compose up --wait` requires this to pass.
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1/", "-o", "/dev/null"]
interval: 10s
timeout: 5s
retries: 6
start_period: 120s
environment: environment:
APP_ENV: ${APP_ENV:-dev} APP_ENV: ${APP_ENV:-dev}
# Caddy site address: :80 accepts any Host (needed when the app is reached via localhost:HTTP_PORT). # Caddy site address: :80 accepts any Host (needed when the app is reached via localhost:HTTP_PORT).

Loading…
Cancel
Save