Skip to content

Commit

Permalink
fix builds
Browse files Browse the repository at this point in the history
  • Loading branch information
4rthem committed Nov 20, 2024
1 parent a16738a commit c5640cb
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 5 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
**/client/build
**/var
**/vendor
**/public/bundles
**/node_modules
**/.idea
**/.php-cs-fixer.php
Expand Down
1 change: 1 addition & 0 deletions databox/api/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ Dockerfile
.idea
/.php-cs-fixer.php
/.php-cs-fixer.cache
/public/bundles
6 changes: 2 additions & 4 deletions databox/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ RUN apk add --no-cache \
exif \
&& apk del build-essentials

RUN chown -R app:app .

USER app

# Warm up composer cache for faster builds
Expand All @@ -57,8 +55,8 @@ RUN composer install --prefer-dist --no-dev --no-progress --classmap-authoritati
&& rm -rf vendor composer.*
# End warm up

COPY lib/php /lib/php
COPY ./databox/api .
COPY --chown=app:app lib/php /lib/php
COPY --chown=app:app ./databox/api .

RUN mkdir -p var/cache var/logs var/sessions \
&& composer install --prefer-dist --no-dev --no-progress --classmap-authoritative --no-interaction \
Expand Down
4 changes: 4 additions & 0 deletions expose/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ ARG BASE_TAG=latest
ARG REGISTRY_NAMESPACE
FROM ${REGISTRY_NAMESPACE}php-fpm-base:${BASE_TAG} AS api-php

USER app

# Warm up composer cache for faster builds
COPY ./expose/api/docker/caching/composer.* ./
RUN composer install --prefer-dist --no-dev --no-progress --classmap-authoritative --no-interaction --no-scripts \
Expand All @@ -19,6 +21,8 @@ RUN mkdir -p var/cache var/logs var/sessions \
ARG SENTRY_RELEASE
ENV SENTRY_RELEASE=${SENTRY_RELEASE}

USER root

ENTRYPOINT ["/srv/app/docker/php-entrypoint.sh"]

CMD ["php-fpm"]
Expand Down
2 changes: 2 additions & 0 deletions infra/docker/php-fpm-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,6 @@ RUN ln -s $PHP_INI_DIR/php.ini-production $PHP_INI_DIR/php.ini \

WORKDIR /srv/app

RUN chown -R app:app .

CMD ["true"]
4 changes: 4 additions & 0 deletions notify/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ ARG BASE_TAG=latest
ARG REGISTRY_NAMESPACE
FROM ${REGISTRY_NAMESPACE}php-fpm-base:${BASE_TAG} AS api-php

USER app

# Warm up composer cache for faster builds
COPY ./notify/api/docker/caching/composer.* ./
RUN composer install --prefer-dist --no-dev --no-progress --classmap-authoritative --no-interaction --no-scripts \
Expand All @@ -19,6 +21,8 @@ RUN mkdir -p var/cache var/logs var/sessions \
ARG SENTRY_RELEASE
ENV SENTRY_RELEASE=${SENTRY_RELEASE}

USER root

ENTRYPOINT ["/srv/app/docker/php-entrypoint.sh"]

CMD ["php-fpm"]
Expand Down
4 changes: 3 additions & 1 deletion uploader/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG BASE_TAG=latest
ARG REGISTRY_NAMESPACE
FROM ${REGISTRY_NAMESPACE}php-fpm-base:${BASE_TAG} AS api-php

RUN printf "\nrequest_terminate_timeout = 600\n" >> /usr/local/etc/php-fpm.d/large-upload.conf
USER app

# Warm up composer cache for faster builds
COPY ./uploader/api/docker/caching/composer.* ./
Expand All @@ -21,6 +21,8 @@ RUN mkdir -p var/cache var/logs var/sessions \
ARG SENTRY_RELEASE
ENV SENTRY_RELEASE=${SENTRY_RELEASE}

USER root

ENTRYPOINT ["/srv/app/docker/php-entrypoint.sh"]

CMD ["php-fpm"]
Expand Down

0 comments on commit c5640cb

Please sign in to comment.