This repository has been archived by the owner on Oct 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #286 from Dino-Kupinic/develop
v0.17.0
- Loading branch information
Showing
22 changed files
with
1,114 additions
and
740 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
#syntax=docker/dockerfile:1.4 | ||
|
||
# Versions | ||
FROM dunglas/frankenphp:1-php8.3 AS frankenphp_upstream | ||
|
||
# The different stages of this Dockerfile are meant to be built into separate images | ||
# https://docs.docker.com/develop/develop-images/multistage-build/#stop-at-a-specific-build-stage | ||
# https://docs.docker.com/compose/compose-file/#target | ||
|
||
|
||
# Base FrankenPHP image | ||
FROM frankenphp_upstream AS frankenphp_base | ||
|
||
WORKDIR /app | ||
|
||
# persistent / runtime deps | ||
# hadolint ignore=DL3008 | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
file \ | ||
gettext \ | ||
git \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN set -eux; \ | ||
install-php-extensions \ | ||
@composer \ | ||
apcu \ | ||
intl \ | ||
opcache \ | ||
zip \ | ||
gd \ | ||
ldap \ | ||
pdo_mysql \ | ||
; | ||
|
||
# https://getcomposer.org/doc/03-cli.md#composer-allow-superuser | ||
ENV COMPOSER_ALLOW_SUPERUSER=1 | ||
|
||
###> recipes ### | ||
###< recipes ### | ||
|
||
COPY --link docker/frankenphp/conf.d/app.ini $PHP_INI_DIR/conf.d/ | ||
COPY --link --chmod=755 docker/frankenphp/docker-entrypoint.sh /usr/local/bin/docker-entrypoint | ||
COPY --link docker/frankenphp/Caddyfile /etc/caddy/Caddyfile | ||
|
||
ENTRYPOINT ["docker-entrypoint"] | ||
|
||
HEALTHCHECK --start-period=60s CMD curl -f http://localhost:2019/metrics || exit 1 | ||
CMD [ "frankenphp", "run", "--config", "/etc/caddy/Caddyfile" ] | ||
|
||
# Dev FrankenPHP image | ||
FROM frankenphp_base AS frankenphp_dev | ||
|
||
#ENV APP_ENV=dev XDEBUG_MODE=off | ||
|
||
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" | ||
|
||
RUN set -eux; \ | ||
install-php-extensions \ | ||
xdebug \ | ||
; | ||
|
||
COPY --link docker/frankenphp/conf.d/app.dev.ini $PHP_INI_DIR/conf.d/ | ||
|
||
CMD [ "frankenphp", "run", "--config", "/etc/caddy/Caddyfile", "--watch" ] | ||
|
||
# Prod FrankenPHP image | ||
FROM frankenphp_base AS frankenphp_prod | ||
|
||
ENV APP_ENV=prod | ||
#ENV FRANKENPHP_CONFIG="import worker.Caddyfile" | ||
|
||
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" | ||
|
||
COPY --link docker/frankenphp/conf.d/app.prod.ini $PHP_INI_DIR/conf.d/ | ||
#COPY --link frankenphp/worker.Caddyfile /etc/caddy/worker.Caddyfile | ||
|
||
# prevent the reinstallation of vendors at every changes in the source code | ||
COPY --link composer.* symfony.* ./ | ||
RUN set -eux; \ | ||
composer update --no-cache --prefer-dist --no-autoloader --no-scripts --no-progress | ||
|
||
# copy sources | ||
COPY --link . ./ | ||
RUN rm -Rf frankenphp/ | ||
|
||
RUN set -eux; \ | ||
composer dump-autoload --classmap-authoritative; \ | ||
composer dump-env prod; \ | ||
chmod +x bin/console; sync; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.