fix: build process
This commit is contained in:
+11
-1
@@ -53,6 +53,12 @@
|
||||
# Dirs
|
||||
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 --from=app_src /app /var/www/html
|
||||
COPY --from=vendor /app/vendor /var/www/html/vendor
|
||||
@@ -78,9 +84,13 @@
|
||||
find storage -type f -exec chmod 664 {} \; ; \
|
||||
chmod -R 775 bootstrap/cache
|
||||
|
||||
# Install Node.js and npm
|
||||
RUN apk add --no-cache nodejs npm
|
||||
RUN composer run setup
|
||||
|
||||
EXPOSE 80
|
||||
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
|
||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||
|
||||
Reference in New Issue
Block a user