mirror of
https://github.com/Babibubebon/lodfe.git
synced 2024-09-22 17:34:19 +09:00
Add Dockerfiles
This commit is contained in:
parent
0a4a31c94d
commit
bf1bc29156
9 changed files with 86 additions and 10 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,}
|
||||||
```
|
```
|
||||||
|
|
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