diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..39691a7 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,16 @@ +version: '3' + +services: + nginx: + image: nginx:latest + ports: + - "8080:80" + volumes: + - ./:/var/www:cached + - ./docker/nginx/czydojade:/etc/nginx/conf.d/czydojade.conf + + php: + build: docker/php + volumes: + - ./:/var/www:cached + - ./docker/php/log.conf:/usr/local/etc/php-fpm.d/zz-log.conf diff --git a/docker/nginx/czydojade b/docker/nginx/czydojade new file mode 100644 index 0000000..e9fbde6 --- /dev/null +++ b/docker/nginx/czydojade @@ -0,0 +1,29 @@ +server { + root /var/www/public/; + server_name czydojade.localhost; + + index index.php; + + location / { + try_files $uri $uri/ /index.php?$args; + + location ~ \.(js|css)$ { + expires 1y; + } + + location ~ ^/index\.php(/|$) { + fastcgi_pass php:9000; + fastcgi_split_path_info ^(.+\.php)(/.*)$; + + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; + fastcgi_param DOCUMENT_ROOT $realpath_root; + + fastcgi_param APP_ENV "dev"; + fastcgi_param DATABASE_URL "sqlite:///%kernel.project_dir%/var/app.db"; + fastcgi_param GOOGLE_ANALYTICS "UA-00000-00"; + + internal; + } + } +} \ No newline at end of file diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile new file mode 100644 index 0000000..0fa1f4e --- /dev/null +++ b/docker/php/Dockerfile @@ -0,0 +1,12 @@ +FROM php:7.3-fpm +RUN pecl install xdebug-2.9.0 && docker-php-ext-enable xdebug + +RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" +RUN php composer-setup.php +RUN php -r "unlink('composer-setup.php');" + +RUN mv composer.phar /usr/local/bin/composer +RUN chmod +x /usr/local/bin/composer +RUN ln -snf /usr/share/zoneinfo/Europe/Warsaw /etc/localtime + +WORKDIR /var/www \ No newline at end of file diff --git a/docker/php/log.conf b/docker/php/log.conf new file mode 100644 index 0000000..39029d9 --- /dev/null +++ b/docker/php/log.conf @@ -0,0 +1,2 @@ +php_admin_flag[log_errors] = on +php_flag[display_errors] = off \ No newline at end of file diff --git a/resources/components/departures.html b/resources/components/departures.html index c114968..9b6b36a 100644 --- a/resources/components/departures.html +++ b/resources/components/departures.html @@ -2,7 +2,7 @@
- + Wybierz przystanki korzystając z wyszukiwarki poniżej, aby zobaczyć listę odjazdów.
\ No newline at end of file