x3ro / draft.sx

Home Page:http://draft.sx

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

draft.sx (archived)

This is a fork of gist.io, which was not maintained at the time. Due to potential legal issues with hosting other people's content under my domain, I shut down the hosted fork some years ago. I don't plan to make any further modifications to this project.

Painlessly share your markdown documents.

Running

Install the following dependencies:

  • docker
  • docker-compose
  • make

For the development setup, run

make run

For the production environment, run

make production

In both cases, you can now access draft.sx at port 80, probably on localhost. If you're using docker-machine, find out the correct IP by running docker-machine ip the-machine-name.

Note: You need to run make build after changing requirements.txt.

Deploying onto a Digital Ocean Docker instance

Note that the files in doc/ and the deploy script assume a couple of paths, IPs and usernames, so please modify if your needs differ :)

  • Run ufw enable
  • Install docker-compose
  • Add user (lucas in my case)
  • Clone draft.sx repository (using HTTPS) into $HOME/draft.sx
  • Add docker and docker-compose to sudoers w/ NOPASSWD (see doc/sudoers)
  • Add doc/draftsx.service to /etc/systemd/system/
  • Enable service w/ systemctl enable draftsx
  • Start service w/ systemctl start draftsx
  • Optional: check out how I'm deploying by looking at scripts/deploy

About

http://draft.sx

License:Other


Languages

Language:SCSS 54.3%Language:HTML 23.3%Language:Python 17.9%Language:Ruby 2.1%Language:Dockerfile 1.2%Language:Shell 0.6%Language:Makefile 0.6%