matthiasstraka / php-invest

Self-hosted stock portfolio tracking software using PHP/Symfony. It tracks portfolios across multiple brokers and automatically updates daily stock data. It allows tracking trades of raw stock and EUSIPA derivatives/instruments.
GNU General Public License v3.0
18 stars 7 forks source link

Dockerfile outdated #35

Closed XMaarten closed 11 months ago

XMaarten commented 1 year ago

I tried to run the demo of php-invest with the Docker container, but this unfortunately fails. During installation it seems that PHP 8.1 is required by Docker Compose. I tried the Dockerfile with php:8.1-cli (and other versions) and had to install bcmath using this: RUN docker-php-ext-install bcmath Eventually the build succeeded but running the container results in /usr/local/bin/docker-php-entrypoint: 9: exec: .: Permission denied I tried to do RUN chmod +x on that file, but was unable to get it to work. I don't understand how the php -S command needs the docker-php-entrypoint anyway. Do you have any suggestion how to get this to work?

Could you maybe add some screenshots of php-invest to get a bit of an understanding about php-invest before installing everything?

matthiasstraka commented 12 months ago

Hi, thanks for pointing me to this issue. I will look into it as soon as I find the time. It's been a while since I tried out the docker version myself. There is a plan to add some "Getting started" documentation and screenshots in the future. Ideally, the docker container already comes with a pre-populated demo of how the application is supposed to be used. But currently I'm more focused on adding features when I find the time :)

matthiasstraka commented 12 months ago

I upgraded the docker file and successfully tested with Docker version 24.0.5. Can you confirm that is now works for you? I did not run into any permission denied issues.

XMaarten commented 12 months ago

When I run the latest Dockerfile I get to the same point as before: /usr/local/bin/docker-php-entrypoint: 9: exec: .: Permission denied I think this is something included in the base image.

I was able to run php-invest by using a shell inside the container and start the webserver from there. Your project looks very interesting, but I am not a fan of the manual import of prices.

matthiasstraka commented 12 months ago

I was able to run php-invest by using a shell inside the container and start the webserver from there.

Good to know. I too had some problems when creating the Docker image from my dev-clone but it worked fine from a clean checkout. I am personally running the project outside a container with Apache and MariaDB, which works without problems.

Your project looks very interesting, but I am not a fan of the manual import of prices.

Thanks. You do not need to manually import prices (in fact you can't at the moment except by manually editing the database). There are several price providers implemented and there is already some documentation for how to use them. Using Marketwatch as a provider usually works great for all stocks, ETFs and currencies and for US stocks you don't even need to add a data source expression.

You need to click the update prices button as well (there is no automatic update yet). image

I am planning to add more providers to handle structured instruments (i.e. discount calls, options, ...) where the price cannot be simply computed from the underlying price. There will be additional documentation in this case.

If you run into any problems, let me know.