mirror of
https://github.com/fleetbase/fleetbase.git
synced 2026-01-08 07:16:49 +00:00
fix application build without composer auth
This commit is contained in:
@@ -59,8 +59,12 @@ RUN chmod -R 755 ./storage
|
||||
# Load the secret into the auth.json file if exists, and install dependencies
|
||||
COPY composer-auth.jso[n] /root/.composer/auth.json
|
||||
RUN --mount=type=secret,id=composer_auth,target=/root/.composer/auth.json \
|
||||
cp /root/.composer/auth.json /var/www/.composer/auth.json 2>/dev/null && \
|
||||
chown www-data:www-data /var/www/.composer/auth.json && \
|
||||
if [ -f "/root/.composer/auth.json" ]; then \
|
||||
mkdir -p /var/www/.composer/ && \
|
||||
cp /root/.composer/auth.json /var/www/.composer/auth.json && \
|
||||
chown www-data:www-data /var/www/.composer/auth.json && \
|
||||
su www-data -s /bin/sh -c "composer install && composer dumpautoload"; \
|
||||
fi; \
|
||||
su www-data -s /bin/sh -c "composer install && composer dumpautoload"
|
||||
|
||||
# Continue
|
||||
|
||||
Reference in New Issue
Block a user