initial commit
parent
ae233e7318
commit
c0be6d440f
@ -1,2 +1,19 @@
|
|||||||
# JikanDockerized
|
Based off https://github.com/tzw0745/jikan-rest-docker
|
||||||
JikanDockerized
|
|
||||||
|
```bash
|
||||||
|
$ docker-compose build
|
||||||
|
$ docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Access the API (v3) `port 9001`:
|
||||||
|
|
||||||
|
```
|
||||||
|
http://localhost:9001/public/v3
|
||||||
|
```
|
||||||
|
|
||||||
|
## More info
|
||||||
|
|
||||||
|
- [Jikan REST API](https://github.com/jikan-me/jikan-rest)
|
||||||
|
- [API docs](https://jikan.docs.apiary.io)
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
version: "3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
|
||||||
|
jikan-rest:
|
||||||
|
build:
|
||||||
|
context: jikan
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
depends_on:
|
||||||
|
- jikan-redis
|
||||||
|
ports:
|
||||||
|
- "9001:80"
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
jikan-redis:
|
||||||
|
image: redis:5.0.3
|
||||||
|
restart: always
|
@ -0,0 +1,42 @@
|
|||||||
|
APP_ENV=production
|
||||||
|
APP_DEBUG=false
|
||||||
|
APP_KEY=
|
||||||
|
APP_TIMEZONE=UTC
|
||||||
|
APP_URL=http://localhost
|
||||||
|
|
||||||
|
DB_CONNECTION=mysql
|
||||||
|
DB_HOST=127.0.0.1
|
||||||
|
DB_PORT=3306
|
||||||
|
DB_DATABASE=homestead
|
||||||
|
DB_USERNAME=homestead
|
||||||
|
DB_PASSWORD=secret
|
||||||
|
|
||||||
|
CACHE_DRIVER=file
|
||||||
|
QUEUE_DRIVER=redis
|
||||||
|
|
||||||
|
CACHE_METHOD=legacy
|
||||||
|
CACHE_DEFAULT_EXPIRE=86400
|
||||||
|
CACHE_META_EXPIRE=300
|
||||||
|
CACHE_USER_EXPIRE=300
|
||||||
|
CACHE_404_EXPIRE=604800
|
||||||
|
CACHE_SEARCH_EXPIRE=432000
|
||||||
|
|
||||||
|
QUEUE_DELAY_PER_JOB=5
|
||||||
|
|
||||||
|
THROTTLE=false
|
||||||
|
THROTTLE_DECAY_MINUTES=1
|
||||||
|
THROTTLE_MAX_PER_DECAY_MINUTES=30
|
||||||
|
THROTTLE_MAX_PER_CONCURRENCY=2
|
||||||
|
|
||||||
|
SLAVE_INSTANCE=false
|
||||||
|
SLAVE_KEY=
|
||||||
|
SLAVE_CLIENT_IP_HEADER="X-Real-IP"
|
||||||
|
SLAVE_KEY_HEADER="X-Master"
|
||||||
|
|
||||||
|
REDIS_HOST=jikan-redis
|
||||||
|
REDIS_PASSWORD=null
|
||||||
|
REDIS_PORT=6379
|
||||||
|
|
||||||
|
GITHUB_REPORTING=false
|
||||||
|
GITHUB_REST="jikan-me/jikan-rest"
|
||||||
|
GITHUB_API="jikan-me/jikan
|
@ -0,0 +1,18 @@
|
|||||||
|
FROM php:7.3.2-apache-stretch
|
||||||
|
|
||||||
|
ENV COMPOSER_ALLOW_SUPERUSER 1
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
openssl \
|
||||||
|
git \
|
||||||
|
unzip \
|
||||||
|
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||||
|
&& composer --version \
|
||||||
|
&& a2enmod rewrite \
|
||||||
|
&& service apache2 restart \
|
||||||
|
&& git clone https://github.com/jikan-me/jikan-rest.git . \
|
||||||
|
&& composer install --prefer-dist --no-progress --no-suggest --classmap-authoritative --no-interaction
|
||||||
|
|
||||||
|
ADD .env /run-jikan.sh ./
|
||||||
|
|
||||||
|
ENTRYPOINT ["./run-jikan.sh"]
|
@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# allow write permission
|
||||||
|
chmod -R a+w storage/
|
||||||
|
|
||||||
|
# php:7.3.2-apache-stretch ENTRYPOINT
|
||||||
|
docker-php-entrypoint apache2-foreground
|
Loading…
Reference in New Issue