fix: build process
This commit is contained in:
1 parent
ea351d2e6d
commit
4ae6948b03
1 file changed
+11
-1
+11
-1
@@ -53,6 +53,12 @@
|
|||||||
# Dirs
|
# Dirs
|
||||||
RUN mkdir -p /run/php /run/nginx /var/log/supervisor /var/www/html /etc/nginx/http.d
|
RUN mkdir -p /run/php /run/nginx /var/log/supervisor /var/www/html /etc/nginx/http.d
|
||||||
|
|
||||||
|
# Install Composer
|
||||||
|
RUN set -eux; \
|
||||||
|
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"; \
|
||||||
|
php composer-setup.php --install-dir=/usr/local/bin --filename=composer; \
|
||||||
|
php -r "unlink('composer-setup.php');"
|
||||||
|
|
||||||
# Copy app + vendor
|
# Copy app + vendor
|
||||||
COPY --from=app_src /app /var/www/html
|
COPY --from=app_src /app /var/www/html
|
||||||
COPY --from=vendor /app/vendor /var/www/html/vendor
|
COPY --from=vendor /app/vendor /var/www/html/vendor
|
||||||
@@ -78,9 +84,13 @@
|
|||||||
find storage -type f -exec chmod 664 {} \; ; \
|
find storage -type f -exec chmod 664 {} \; ; \
|
||||||
chmod -R 775 bootstrap/cache
|
chmod -R 775 bootstrap/cache
|
||||||
|
|
||||||
|
# Install Node.js and npm
|
||||||
|
RUN apk add --no-cache nodejs npm
|
||||||
|
RUN composer run setup
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
HEALTHCHECK --interval=30s --timeout=5s --retries=5 \
|
HEALTHCHECK --interval=30s --timeout=5s --retries=5 \
|
||||||
CMD curl -fsS http://localhost/healthz || exit 1
|
CMD curl -fsS http://localhost/healthz || exit 10
|
||||||
|
|
||||||
# Default: just start services; artisan is opt-in via env
|
# Default: just start services; artisan is opt-in via env
|
||||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||||
|
|||||||
Reference in new issue
Block a user