fred4jupiter / fredbet

Simple football betting application using Spring Boot, Thymeleaf and Bootstrap. Well prepared for betting with friends.
MIT License
119 stars 63 forks source link

Images not mounted as Volume #8

Closed trigrab closed 6 years ago

trigrab commented 6 years ago

Hi,

I am using this project for a small amount of people in my work group. First of all: Thanks for sharing this project. I like it, especially that you are using docker.

After installing and creating all the users I recognized, that we can upload images as avatar. Unfortunately I had to rebuild after all that and the images are not saved. I looked into your Dockerfile and the folder /home/fred/fredbet_images is not declared as Volume.

I hope you can fix this also in your docker-compose examples. As I like to place all the data in on folder on the filesystem and not storing it in volumes which are stored somewhere else.

As this does not really affect me anymore, because I already have declared a volume in my personal docker compose file. Consider this more as an information for the future.

Thank you.

fred4jupiter commented 6 years ago

Hi trigrab,

there are two properties you have to configure for using the images:

For storing the images in file system you have to set fredbet.image-location=FILE_SYSTEM. The next one is to configure the path where to store the images. Please use an absolute path for this.

The docker-compose files are examples only. You can customize it for your needs. Just add a volume for your selected path to store images outside of your container.

I can update the docker compose files to have a blueprint for that.

fred4jupiter commented 6 years ago

I´ve added the volume mount in the example docker compose files. See postgresql.yml as an example.