Git Product home page Git Product logo

tiddlyhost's Introduction

Tiddlyhost

About

Tiddlyhost is the new Tiddlyspot, a hosting service for TiddlyWiki.

It aims to be the easiest and best way to use TiddlyWiki online.

Unlike the original Tiddlyspot, Tiddlyhost features:

  • Secure SSL
  • Password recovery
  • TiddlyWiki5 support
  • Open source code

For more information please see FAQ.

Current Status

Tiddlyhost is in active development.

For status updates see the Journal.

Getting Started (for developers)

Todo: Describe the other way to bring up a development system where you run rails directly.

Prepare environment

You need to have docker and docker-compose installed on your system.

Check out the code:

git clone [email protected]:simonbaird/tiddlyhost.git
cd tiddlyhost

Build the development container and set up rails

Build the container image used for development:

make build-base

Install all ruby gems, node modules, and initialize the databases:

make rails-init

Run the test suite. Hopefully it's all passing:

make test

Tiddlyhost uses wildcard subdomains. To simulate this for local development, add some entries to your /etc/hosts:

127.0.0.1 tiddlyhost.local
127.0.0.1 aaa.tiddlyhost.local
127.0.0.1 bbb.tiddlyhost.local
127.0.0.1 foo.tiddlyhost.local
127.0.0.1 bar.tiddlyhost.local

You should now be able to start rails like this:

(It runs in the foreground, so I suggest you do this in a second terminal window.)

make start

Visit https://tiddlyhost.local/ in your browser and you should see a working web application.

Note that the development environment is using a self-signed SSL certificate, so you will need to accept the warnings about insecure connections.

Create an account and create a site

Click "Sign up" and enter some details. A fake email address is fine.

Emails won't be sent when running locally, but you can find the email confirmation link by running this:

make signup-link

Click that link and then you should be able to sign in.

Click "Create Site" to create a site. Note that you need to use a site name that matches something that you added to your /etc/hosts file, aaa or bbb for example.

Click on the site to open it. Accept the certificate warnings again. Click the save button and confirm your site was able to be saved.

To give your local user admin permissions, do the following:

make console
User.first.update(user_type_id: 2)
exit

Now reload the Tiddlyhost page in your browser and you should see the "Admin" link.

Create other sites or other local accounts as required.

Other useful commands

Note that the container mounts the rails directory, so the code can be edited there outside the container while rails is running inside the container.

You can shell into the running container in another terminal like this:

make join

From there you can access the rails console, run tests, etc, inside the container.

You can hit Ctrl-C in the terminal where you ran make start to shut it down.

You can also shut down and clean up like this:

make cleanup

Note that the make tasks are mostly just wrappers for docker-compose so you can use your own docker-compose commands directly if you prefer. See the Makefile for details.

Run make by itself to see a full list of make commands. Read the Makefile to learn more about what they do.

License

Tiddlyhost is open source software. It uses a BSD license. See LICENSE.md.

tiddlyhost's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

tiddlyhost's Issues

Transfer tiddlyspot.com to Route 53

Currently it's in Google Domains. It might be that getting the letsencrypt to work with google domains is easy, but it's better if there's just one way to do it.

Make docker hub repo private

Maybe it doesn't matter much, but we can fairly easily add some credentials to the prod host to allow pulling from a private repo.

TH as a central hub/library

Simon, if this is too much off topic, just close it right away. No need to explain.

The need for a central hub for e.g plugin distribution is greater than ever after TS shut down. Could TH somehow have a "front" where all wikis that are somehow marked as "plugins" and other categories, appear? I.e they appear as links to their respective wiki.

It would be ideal if any user could add meta data to the listed instances on that front site, e.g to categorize the wiki(link), and maybe give reviews etc. (I have further thoghts on this, if it is of interest).

See also User stories for a community plugin library #5399 for relevant aspects.

Tiddlyhost.com down due to networking problem

I can't ping tiddlyhost.com. Restarting the instance didn't fix it.

From https://www.dreamhoststatus.com/

February 17, 2021 3:07AM PST [Investigating] Our Cloud Engineers are investigating an issue resulting in connectivity issues on customer DreamCompute instances. We are closely monitoring the situation and will be posting periodic updates as further information becomes available.

Automate provisioning of VMs in DreamCompute Openstack

It would be good if I could build/rebuild the openstack instance (using ansible probably) rather than try to remember what I clicked on to create it.

Also it would help with #36 if I could create an adhoc non-prod instance of Tiddlyhost easily.

Cache site reads

For public sites with a lot of traffic caching should be effective. Currently we fetch from s3 every time a site is served.

Redis, memcached, something else?

Make it easy for someone to create their own Tiddlyhost instance

Currently there's a few things that are specific to tiddlyhost.com

Considerations:

  • Deployments
  • Secrets
  • Hostnames
  • Certificates & Let's Encrypt
  • DNS
  • Configuration, settings etc
  • Documentation, i.e. how to do it

There's two ideas:

  • Someone checks out the code and builds their own container image, and uses that for their own Tiddhost instance.
  • Someone uses the pre-built container image with all of the instance specific configuration applied at run time to make it work.

The second idea is cooler.

(Will probably not get to this for a while.)

Add subdomain based "spaces" for sites

At the moment, anyone can have any site name, but maybe it would be better if there were "spaces" owned by one user, where you could choose a site name without it clashing with existing sites. It wouldn't be a proper subdomain in dns terms, but the "domain labels with dots" idea that used to work fine for Tiddlyspot. (Currently Tiddlyhost deliberately disallows '.' chars in the site name.)

E.g. notes.simon.tiddlyhost.com, aboutme.simon.tiddyspot.com

Only the owner of the space would be allowed to create sites in that space.

It would be possible to rename your space (I guess), and move sites to and from a space.

Figure out how to associate an S3 file with a TH site id in S3

If we do lose some database changes (touch wood) blobs in S3 will still be there, but rails active storage won't know their keys. If we could discover the site id for a blob (or maybe user id and site name?), we would have a chance of recovering it.

I think S3 files have metadata. Can I poke some fields into it? If so then how?

Limit site size

Very large sites cause problems for Tiddlyhost, but it tends to be self-limiting since users realize this too. Maybe an oversize warning is a useful idea.

Create some better quality logo images in a few sizes

The original is an svg file with transparency and there's also an ico file. The transparency means you can't use it on a white page. Should create some pngs of different sizes and check them in. Maybe also fix the svg so it is visible on a white page.

Some kind of monitoring

Basic "site down" alerts

Less basic "site experiencing stress/slow response times/critically low disk space/etc" alerts

Advanced: Useful charts, stats, etc

Nginx front end

We're running docker compose in prod with no front end. Is that wise?

Most people seem to run nginx..

Could maybe serve public sites straight from cache without hitting rails.

Would need to redo how certs are configured.

Puma could stop doing ssl if nginx reverse proxies the rails container.

Also load balancing maybe.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.