Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

laravel assets not working laradock multiple project #2107

Closed
RyaiStudio opened this issue May 1, 2019 · 2 comments
Closed

laravel assets not working laradock multiple project #2107

RyaiStudio opened this issue May 1, 2019 · 2 comments
Labels

Comments

@RyaiStudio
Copy link

Info:

  • Docker version 18.09.2
  • Laradock commit f5c80cd
  • System info Windows, Mac, Ubuntu

Issue:

I manage to setup Laradock on my workspace with multiple projects but I'm having problem about my assets directory not loading properly on my laravel-site

I already tried all the following command.
$ php artisan migrate:refresh --seed
$ php artisan storage:link
chmod -R 755 storage & chmod -R 755 public
error:
cannot write to directory "public\storage\assets\images"

directory

- laradock
 - nginx
  - sites
   - laravel-site.conf
- wordpress-site
- laravel-site

Expected behavior:

// laravel syntax
{{ asset('storage/assets/images/sample.jpg') }}

error output: storage/assets/images/sample.png undefine path
expected output: storage/images/sample.png


Reproduce:


Relevant Code:

'image_url' => $faker->image('public/storage/assets/stickers',350,350)

laravel-site.conf

server {

    listen 80;
    listen [::]:80;

    # For https
    # listen 443 ssl;
    # listen [::]:443 ssl ipv6only=on;
    # ssl_certificate /etc/nginx/ssl/default.crt;
    # ssl_certificate_key /etc/nginx/ssl/default.key;

    server_name stickerfarm.test;
    root /var/www/stickerfarm/public;
    index index.php index.html index.htm;

    location / {
         try_files $uri $uri/ /index.php$is_args$args;
    }

    location ~ \.php$ {
        try_files $uri /index.php =404;
        fastcgi_pass php-upstream;
        fastcgi_index index.php;
        fastcgi_buffers 16 16k;
        fastcgi_buffer_size 32k;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        #fixes timeouts
        fastcgi_read_timeout 600;
        include fastcgi_params;
    }

    location ~ /\.ht {
        deny all;
    }

    location /.well-known/acme-challenge/ {
        root /var/www/letsencrypt/;
        log_not_found off;
    }

    error_log /var/log/nginx/app_error.log;
    access_log /var/log/nginx/app_access.log;
}


@stale
Copy link

stale bot commented Feb 2, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale label Feb 2, 2020
@stale
Copy link

stale bot commented Feb 23, 2020

Hi again 👋 we would like to inform you that this issue has been automatically closed 🔒 because it had not recent activity during the stale period. We really really appreciate your contributions, and looking forward for more in the future 🎈.

@stale stale bot closed this as completed Feb 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant