pereorga / minimalist-web-notepad

Minimalist Web Notepad
https://notes.orga.cat
1.13k stars 282 forks source link

Added Dockerimage #35

Closed worldworm closed 4 years ago

worldworm commented 4 years ago

do you want to push an official image to the dockerhub or should I create a "unofficial" on?

pereorga commented 4 years ago

Great, thanks!

I like the idea of having it here, but I'm not sure, because everything is in docroot. Now docker-compose.yml can be downloaded, maybe an access restriction should be added via .htaccess.

# Set accesrights for Apache
RUN chown -R www-data:www-data $APP_PATH && \
    chmod -R 775 $APP_PATH/_tmp/

I think this can be simplified:

# Set acces rights for Apache
RUN chown www-data:www-data $APP_PATH/_tmp/

I just tested and I can confirm it works. Apache doesn't need to write outside _tmp.

I couldn't run docker-compose, maybe because I have an older version (I get ERROR: Version in "./docker-compose.yml" is unsupported). Should the version set in docker-compose.yml be downgraded to increase compatibility? Sorry, I have used docker before, but I'm not used to it yet.

worldworm commented 4 years ago

Hi, thank you for your suggestions!

I have reduced the docker-compose version. I think it should be possible to make it even smaller, but 2.4 is already 2 years old and should be supported everywhere (I hope). In addition i have adapted the chown as suggested and forbidden calling docker-compose.yml via htaccess.

Please have a second look :)

pereorga commented 4 years ago

merged, thanks!