Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker support #5

Merged
merged 2 commits into from
Oct 18, 2020
Merged

Docker support #5

merged 2 commits into from
Oct 18, 2020

Conversation

NanoBjorn
Copy link
Contributor

Hello!

Wanted to render one page regularly and to avoid chromedriver struggles on any OS, so wrote a docker/Dockerfile and docker-compose.yml. Also added small instruction to readme.

P.S. Btw it seems that loconotion does not support Boards rendering. Tried mine and had very bad buggy page.

@leoncvlt
Copy link
Owner

Thanks for this! I don't have much experience with docker but it seems useful. Is the PATH_TO_NOTION_FILE you mention in the readme the .toml file, or does this support the "simple usage" caching passing the notion url as well?

@leoncvlt
Copy link
Owner

P.S. Also, do you have examples of pages which fail the boards rendering? Always useful to have a failing test case.

@leoncvlt leoncvlt mentioned this pull request Oct 10, 2020
@philfreo
Copy link

philfreo commented Oct 10, 2020

This worked for me, thanks. Only surprising thing was that it defaulted to outputting in /tmp instead of ./dist/ by default.

Might want to either change that default path or else have the default example include passing an env var like LOCONOTION_LOCAL_DIST=./dist docker-compose run loconotion https://www.notion.so/The-perfect-It-s-Always-Sunny-in-Philadelphia-episode-d08aaec2b24946408e8be0e9f2ae857e

To take this further, it'd be great to see this merged and then have a Docker image pushed to Dockerhub. I think that would then enable a single command to run this without even having to have the locomotion git repo checked out locally at all. I'd love to run a single command (or docker-compose.yml file only) in my GitHub repo directory that builds and outputs right there so I can just git push & host the HTML in GitHub Pages.

@philfreo
Copy link

@NanoBjorn what do you think about that?

As of now, I made a little script https://github.com/philfreo/sjc.vote/blob/main/update for a one liner to run which requires that this branch of loconotion is checked out in a sibling directory to my own static site. With the changes mentioned above I think this could be simplified.

@NanoBjorn
Copy link
Contributor Author

I thought that for local use /tmp/ by default is more safe location than ./dist. I would better mention the env variable in the readme instead of changing the default.

@philfreo
Copy link

philfreo commented Oct 16, 2020

While I disagree (since the output is the important artifact, not a 'temp' file), I suppose that's @leoncvlt's call –– and ultimately I'd be happy for this to get merged regardless of the default path, and pushed to dockerhub. I agree improving the README to mention the env var would definitely help.

@leoncvlt leoncvlt merged commit 160ea4e into leoncvlt:master Oct 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants