-
Notifications
You must be signed in to change notification settings - Fork 3
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
Host a static Jekyll website (WIP) #5
base: master
Are you sure you want to change the base?
Conversation
52e8d08
to
7eb470c
Compare
7eb470c
to
2b88f90
Compare
@pierrebeaucamp hey I feel that this is your area of expertise, would appreciate if you can have a look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting this together @chrisbarless !
VIRTUAL_HOST: "tomesh.dev,www.tomesh.dev" | ||
VIRTUAL_PORT: 4000 | ||
LETSENCRYPT_HOST: "tomesh.dev,www.tomesh.dev" | ||
LETSENCRYPT_EMAIL: "[email protected]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What email shall we use for this? Shall we make one for tools? https://github.com/tomeshnet/documents/blob/master/service_setup/email.md#public-accounts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
environment: | ||
ACME_CA_URI: https://acme-staging.api.letsencrypt.org/directory # testing value | ||
|
||
jekyll: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we need to put github.com/tomeshnet/tomesh.net
as source and add the webhook?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something like that!
LETSENCRYPT_EMAIL: "[email protected]" | ||
|
||
cjdns: | ||
image: chpio/cjdns:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably run a particular tag than let it version float.
Thanks for pinging me @benhylau. In general, there doesn't seem to be anything wrong with this PR. If it gets the job done and you have someone supporting this architecture, I'd say go with it. But I want to give some more general comments on this approach:
Again, there is no right or wrong approach to devops. If this setup works, and more importantly, someone understands it and can maintain it, go with it. But given the requirements to just serve a static site behind SSL I would probably go with something like this:
With this approach, you don't need Docker compose at all and only have a single process running. You also don't need to trust multiple third parties, only a single one. The downsite to all this is that it might not be as extensible as Docker compose, if you want to add things in the future. I also don't know about CJDNS. Again, my main recommendation is to pick one devops / deploy tool and stick with it. If you don't have anything set up on the server yet, you might as well go with docker compose. Also as a general note: I'd always go with a separate CI system and try to build my own containers once the setup reaches a certain complexity (like this one). Hope that helps. I don't follow this project too closely anymore, so I hope I didn't upset anyone by jumping in here. |
that's some really excellent advice @pierrebeaucamp, i will take it to heart. lots to think about |
@pierrebeaucamp thanks for the comments. To answer some of that:
Manually deployed on a Droplet, with step-by-step docs. The goal is to use provisioning tools and have those steps as code, reducing the manual steps. Re: trusting container images, is there general best practices for this such as pinning particular versions of it so at least we are shielded from the "new malicious version" risk?
I agree. Can we jekyll generate static assets on the same rules as we do now (on new commit and daily), into a static folder? @garrying how is it currently done, do we just
We do need it for next phase of this project because we want to serve the site over cjdns, and add the monitoring system which requires pinging cjdns nodes to check if they are active.
Yes we plan to add ipfs and dat daemons so the site can be served over those protocols as well. Then there is cjdns, prometheus server, etc. so it does sound like multiple docker containers would provide the right separation for manageability, although not necessarily the security boundaries the way we have it. As @chrisbarless mentioned, your comments is definitely very much appreciated! |
There's a bash script that does I'll take a look at this PR on the weekend. |
could crib back from our networks and set up a travis CI flow for web-avail website, but that seems like not the right flow for nodes |
Resolves #1
So far just showing how I would go about creating this node.
As you can see there are official/popular (1MM+ implementations) Docker images for almost any project. I use
docker-compose
to orchestrate instances of the images and get them to talk to each other over Docker networks.I've added an nginx reverse proxy, let'sencrypt nginx companion, and used them to serve a simple Jekyll fileserver over SSL here with very little config.
docker-compose up
does all the magic on any machine with Docker installed.I also added the most popular CJDNS image to the
docker-compose.yml
file to show what that looks like, although it's not configured. I haven't dove into IPFS yet but here are the most popular IPFS projects https://hub.docker.com/search/?isAutomated=0&isOfficial=0&page=1&pullCount=0&q=ipfs&starCount=0Next steps will be to configure Jekyll to serve our actual site, and configure ipfs/cjdns setup