0

I installed docker and downloaded zip archive with docker-compose from generator (http://phpdocker.io/generator). Do you know what this page is? This zip archive is working on my Windows 10 Pro, but on my laptop with Ubuntu 16.04 it crashes. It doesn’t load css, js or images in www dir.

phpdocker/nginx/nginx.conf

server {
    listen 80 default;

    client_max_body_size 108M;

    access_log /var/log/nginx/devel.access.log;


    root /var/www/devel/www;
    index index.php;

    if (!-e $request_filename) {
        rewrite ^.*$ /index.php last;
    }

    location ~ \.php$ {
        fastcgi_pass devel-php-fpm:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PHP_VALUE "error_log=/var/log/nginx/devel_php_errors.log";
        fastcgi_buffers 16 16k;
        fastcgi_buffer_size 32k;
        include fastcgi_params;
    }

} 

DockerFile

FROM phpdockerio/php56-fpm:latest

# Install selected extensions and other stuff
RUN apt-get update \
    && apt-get -y --no-install-recommends install  php5-mysql php5-xdebug php5-sqlite vim mc \
    && apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*


WORKDIR "/var/www/devel"

part of docker-compose.yml

devel-once-php-fpm:
  build: .
  dockerfile: php-fpm/Dockerfile
  container_name: devel-php-fpm
  volumes:
    -  ./../projectnette:/var/www/devel
    - ./php-fpm/php-ini-overrides.ini:/etc/php5/fpm/conf.d/99-overrides.ini

Do you know what causes the error? What did I do wrong?

Jan Tojnar
  • 5,306
  • 3
  • 29
  • 49
ondrusu
  • 97
  • 4
  • Can you describe what exactly crashes? What is the error message? – Jan Tojnar Jan 13 '17 at 16:00
  • For me, `docker-compose up` spins up the containers okay. Did you also set the volume path for `devel-webserver`? – Jan Tojnar Jan 13 '17 at 18:28
  • No error. Only It's non-loading all files from www dir in nette project. But here: https://dl.dropboxusercontent.com/u/24947815/obrazkyForum/log-docker.txt is log from `docker-compose up` – ondrusu Jan 16 '17 at 07:21
  • Yes, volumes for devel-webserver is : `devel-webserver: image: phpdockerio/nginx:latest container_name: devel-webserver volumes: - ../projectnette:/var/www/devel - ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf ports: - "8080:80" links: - devel-php-fpm` – ondrusu Jan 16 '17 at 07:24
  • Also check the nginx log: `docker exec -it devel-webserver cat /var/log/nginx/devel.access.log` – Jan Tojnar Jan 16 '17 at 10:48
  • What do I find? In the `access.log` file is nothing interesting. Only 500 error in file from www dir. Nette is think, dir images, js, css are presenters. Why? It's wrong? – ondrusu Jan 16 '17 at 18:34

0 Answers0