mirror of
https://github.com/Babibubebon/lodfe.git
synced 2024-09-23 01:34:21 +09:00
Merge branch 'develop'
This commit is contained in:
commit
03ba5758b3
12 changed files with 94 additions and 11 deletions
8
.dockerignore
Normal file
8
.dockerignore
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
.env
|
||||||
|
.git
|
||||||
|
.idea
|
||||||
|
vendor
|
||||||
|
storage/app/*
|
||||||
|
storage/framework/cache/*
|
||||||
|
storage/framework/views/*
|
||||||
|
storage/logs/*
|
|
@ -11,5 +11,5 @@ trim_trailing_whitespace = true
|
||||||
[*.md]
|
[*.md]
|
||||||
trim_trailing_whitespace = false
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
[*.{yml,yaml}]
|
[*.{yml,yaml,conf}]
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
|
@ -1,19 +1,12 @@
|
||||||
APP_NAME=lodfe
|
APP_NAME=lodfe
|
||||||
APP_ENV=local
|
APP_ENV=local
|
||||||
APP_KEY=
|
APP_KEY=
|
||||||
APP_DEBUG=true
|
APP_DEBUG=false
|
||||||
APP_URL=http://localhost
|
APP_URL=http://localhost
|
||||||
APP_TIMEZONE=UTC
|
APP_TIMEZONE=UTC
|
||||||
|
|
||||||
LOG_CHANNEL=stack
|
LOG_CHANNEL=stack
|
||||||
LOG_SLACK_WEBHOOK_URL=
|
LOG_SLACK_WEBHOOK_URL=
|
||||||
|
|
||||||
DB_CONNECTION=mysql
|
|
||||||
DB_HOST=127.0.0.1
|
|
||||||
DB_PORT=3306
|
|
||||||
DB_DATABASE=homestead
|
|
||||||
DB_USERNAME=homestead
|
|
||||||
DB_PASSWORD=secret
|
|
||||||
|
|
||||||
CACHE_DRIVER=file
|
CACHE_DRIVER=file
|
||||||
QUEUE_CONNECTION=sync
|
QUEUE_CONNECTION=sync
|
||||||
|
|
|
@ -4,7 +4,8 @@ SPARQLエンドポイントを用いたLinked Open Dataフロントエンド([Pu
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
```
|
```
|
||||||
|
$ git clone https://github.com/Babibubebon/lodfe.git
|
||||||
|
$ cd lodfe
|
||||||
$ composer install
|
$ composer install
|
||||||
$ cp .env{.example,}
|
|
||||||
$ cp config/datasets.php{.example,}
|
$ cp config/datasets.php{.example,}
|
||||||
```
|
```
|
||||||
|
|
|
@ -29,6 +29,10 @@ class ResourceController extends Controller
|
||||||
*/
|
*/
|
||||||
protected function querySparql($request)
|
protected function querySparql($request)
|
||||||
{
|
{
|
||||||
|
if (!empty($request->datasetConfig['http'])) {
|
||||||
|
$httpClient = new \EasyRdf\Http\Client(null, $request->datasetConfig['http']);
|
||||||
|
\EasyRdf\Http::setDefaultHttpClient($httpClient);
|
||||||
|
}
|
||||||
$client = new \EasyRdf\Sparql\Client($request->datasetConfig['endpoint']);
|
$client = new \EasyRdf\Sparql\Client($request->datasetConfig['endpoint']);
|
||||||
$query = <<<EOT
|
$query = <<<EOT
|
||||||
CONSTRUCT {
|
CONSTRUCT {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
'version' => '1.2.4',
|
'version' => '1.2.5',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
@ -8,6 +8,9 @@ return [
|
||||||
'html_uri' => 'https://example.com/page/{id}',
|
'html_uri' => 'https://example.com/page/{id}',
|
||||||
'data_uri' => 'https://example.com/data/{id}',
|
'data_uri' => 'https://example.com/data/{id}',
|
||||||
'endpoint' => 'https://example.com/query', // SPARQL endpoint URI
|
'endpoint' => 'https://example.com/query', // SPARQL endpoint URI
|
||||||
|
'http' => [
|
||||||
|
'timeout' => 30,
|
||||||
|
]
|
||||||
],
|
],
|
||||||
*/
|
*/
|
||||||
];
|
];
|
||||||
|
|
22
docker-compose.dev.yml
Normal file
22
docker-compose.dev.yml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
version: "3"
|
||||||
|
services:
|
||||||
|
php:
|
||||||
|
image: babibubebon/lodfe:latest-php
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: ./docker/php/Dockerfile
|
||||||
|
volumes:
|
||||||
|
- ./:/var/www/lodfe
|
||||||
|
|
||||||
|
nginx:
|
||||||
|
image: babibubebon/lodfe:latest-nginx
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: ./docker/nginx/Dockerfile
|
||||||
|
ports:
|
||||||
|
- 80:80
|
||||||
|
depends_on:
|
||||||
|
- php
|
||||||
|
volumes:
|
||||||
|
- ./:/var/www/lodfe
|
||||||
|
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
|
13
docker-compose.yml
Normal file
13
docker-compose.yml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
version: "3"
|
||||||
|
services:
|
||||||
|
php:
|
||||||
|
image: babibubebon/lodfe:latest-php
|
||||||
|
volumes:
|
||||||
|
- ./config/datasets.php:/var/www/lodfe/config/datasets.php:ro
|
||||||
|
|
||||||
|
nginx:
|
||||||
|
image: babibubebon/lodfe:latest-nginx
|
||||||
|
ports:
|
||||||
|
- 80:80
|
||||||
|
depends_on:
|
||||||
|
- php
|
4
docker/nginx/Dockerfile
Normal file
4
docker/nginx/Dockerfile
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
FROM nginx:1.19-alpine
|
||||||
|
|
||||||
|
ADD ./docker/nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||||
|
ADD ./public /var/www/lodfe/public
|
27
docker/nginx/default.conf
Normal file
27
docker/nginx/default.conf
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
server {
|
||||||
|
listen 80 default_server;
|
||||||
|
server_name _;
|
||||||
|
root /var/www/lodfe/public;
|
||||||
|
|
||||||
|
add_header X-Frame-Options "SAMEORIGIN";
|
||||||
|
add_header X-XSS-Protection "1; mode=block";
|
||||||
|
add_header X-Content-Type-Options "nosniff";
|
||||||
|
|
||||||
|
index index.php;
|
||||||
|
|
||||||
|
charset utf-8;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.php?$query_string;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ \.php$ {
|
||||||
|
fastcgi_pass php:9000;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||||
|
include fastcgi_params;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ /\.(?!well-known).* {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
}
|
8
docker/php/Dockerfile
Normal file
8
docker/php/Dockerfile
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
FROM php:7.4-fpm-alpine
|
||||||
|
|
||||||
|
ARG WORKDIR=/var/www/lodfe
|
||||||
|
WORKDIR ${WORKDIR}
|
||||||
|
|
||||||
|
COPY --from=composer /usr/bin/composer /usr/bin/composer
|
||||||
|
ADD --chown=www-data:www-data . /var/www/lodfe
|
||||||
|
RUN composer install
|
Loading…
Reference in a new issue