CSS not working in Laravel project deployed to Google Cloud Run

  css, docker, google-cloud-run, laravel

I deployed a dockerized Laravel project to Google Cloud Run. The CSS works great locally. When I go to the page that is hosted, there are no styles applied. When I inspect the page, I see that the CSS has been found and is correct, but the styles are not applied.

Proof that it is seeing my CSS

Here is my dockerfile

FROM php:7.4-fpm-alpine

RUN apk add --no-cache nginx wget

RUN mkdir -p /run/nginx

COPY docker/nginx.conf /etc/nginx/nginx.conf

RUN mkdir -p /app
COPY . /app

RUN sh -c "wget http://getcomposer.org/composer.phar && chmod a+x composer.phar && mv composer.phar /usr/local/bin/composer"
RUN cd /app && 
    /usr/local/bin/composer install --no-dev

RUN chown -R www-data: /app

CMD sh /app/docker/startup.sh

Source: Laravel

Leave a Reply