Git Product home page Git Product logo

jikan-rest-docker's People

Contributors

fethica avatar tzw0745 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

jikan-rest-docker's Issues

API Issues

Hey, when browsing to http://ip:9000 with ip being my IP I get

Forbidden
You don't have permission to access / on this server.

And it seems logs show me

AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive

And trying to go on http://ip:9000/public/v3
gives me

<br />
<b>Fatal error</b>:  Uncaught UnexpectedValueException: The stream or file &quot;/var/www/html/storage/logs/lumen.log&quot; could not be opened: failed to open stream: Permission denied in /var/www/html/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:107
Stack trace:
#0 /var/www/html/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(39): Monolog\Handler\StreamHandler-&gt;write(Array)
#1 /var/www/html/vendor/monolog/monolog/src/Monolog/Logger.php(344): Monolog\Handler\AbstractProcessingHandler-&gt;handle(Array)
#2 /var/www/html/vendor/monolog/monolog/src/Monolog/Logger.php(707): Monolog\Logger-&gt;addRecord(400, Object(UnexpectedValueException), Array)
#3 /var/www/html/vendor/laravel/lumen-framework/src/Exceptions/Handler.php(45): Monolog\Logger-&gt;error(Object(UnexpectedValueException))
#4 /var/www/html/app/Exceptions/Handler.php(46): Laravel\Lumen\Exceptions\Handler-&gt;report(Object(UnexpectedValueException))
#5 /var/www/html/vendor/laravel/lumen-framework/src/Concerns/RegistersExceptionHandlers.php(122): App\Except in <b>/var/www/html/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php</b> on line <b>107</b><br />
<br />
<b>Fatal error</b>:  Uncaught UnexpectedValueException: The stream or file &quot;/var/www/html/storage/logs/lumen.log&quot; could not be opened: failed to open stream: Permission denied in /var/www/html/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:107
Stack trace:
#0 /var/www/html/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(39): Monolog\Handler\StreamHandler-&gt;write(Array)
#1 /var/www/html/vendor/monolog/monolog/src/Monolog/Logger.php(344): Monolog\Handler\AbstractProcessingHandler-&gt;handle(Array)
#2 /var/www/html/vendor/monolog/monolog/src/Monolog/Logger.php(707): Monolog\Logger-&gt;addRecord(400, Object(Symfony\Component\Debug\Exception\FatalErrorException), Array)
#3 /var/www/html/vendor/laravel/lumen-framework/src/Exceptions/Handler.php(45): Monolog\Logger-&gt;error(Object(Symfony\Component\Debug\Exception\FatalErrorException))
#4 /var/www/html/app/Exceptions/Handler.php(46): Laravel\Lumen\Exceptions\Handler-&gt;report(Object(Symfony\Component\Debug\Exception\FatalErrorException))
#5 /var/www/html/vend in <b>/var/www/html/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php</b> on line <b>107</b><br />

Running the docker

Greetings,
i am pretty new to these topics so sorry for any weird questions in advance.

i was trying to host the docker on my machine using Visual studio code though after building the image i can't run it using it's own default run which is run-jikan.sh ( since i am on windows i guess?)
and my only way to run it was to type the command on powershell
docker-compose up -d
which is ok but what if i wanted to host it some where like azure, it uses the default run in the image.
i tried to change the docker file to be like this
ENTRYPOINT ["docker-compose up -d"]
but it doesn't seem to work.
here is the output when i just click run on the image

docker run --rm -d -p 80:80/tcp jikan-rest-img:latest

27004a1db29323974690dbe91518d85e6c02b927d5005868b98b475662b7ecbd C:\Program Files\Docker\Docker\resources\bin\docker.exe: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"./run-jikan.sh\": stat ./run-jikan.sh: no such file or directory": unknown.

even the ports it is not using the 9000:80 by default, i tried it but it is the same

Thank you.

fix breaking composer changes

The new composer version deprecates the --no-suggest flag, so should be removed from this line.

Also, is a version in the composer.lock which is locked:

Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - ocramius/package-versions is locked to version 1.5.1 and an update of this package was not requested.
    - ocramius/package-versions 1.5.1 requires composer-plugin-api ^1.0.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.

ocramius/package-versions only provides support for Composer 2 in 1.8+, which requires PHP 7.4.
If you can not upgrade PHP you can require composer/package-versions-deprecated to resolve this with PHP 7.0+.

You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.

... which causes the build to fail.

I'm unsure if this is the right solution, but running composer require composer/package-versions-deprecated beforehand makes that run fine. Do you have any thoughts here @irfan-dahir ?

I have the corresponding changes on my fork (with some others); I'm unable to test this directly because of a some apache error on machine (says I have to set a 'Server Name'), I just run this with php -S: https://github.com/seanbreckenridge/jikan-rest-docker/blob/master/Dockerfile#L15-L17

Would also recommend adding the composer update jikan-me/jikan after the composer install.

Often when there are breaking parser (jikan-me/jikan) changes the pinned parser version in the jikan-me/jikan-rest package doesn't updated for a few hours/till the next major change/version bump, so it requires the user to run composer update jikan-me/jikan manually. Having to exec bash into the image and running the command is quite annoying, Adding that to the docker build process means anyone using this can rebuild the image and that updates the jikan parser version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.