From b595ad833bfe5922aaf8f4fa75ceb619a26368db Mon Sep 17 00:00:00 2001 From: Derek Gonyeo Date: Tue, 27 Feb 2018 20:02:26 -0800 Subject: [PATCH] update README --- README.md | 60 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 03bd0e5..c0e1007 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,40 @@ inventory, and filter recipes by spirit type, glass, and a search string. ![Screenshot of the homepage](screenshots/2018-02-22_20:22:45_3200x1800_scrot.png) -## Acquiring cyanide +More screenshots (which may or may not be out of date) are available in the +[screenshots directory][screenshots]. + +## Running cyanide + +Cyanide was developed, tested, and is actively used on Linux. It's possible it +will run without issue on MacOS or Windows, but this hasn't been attempted. + +Running concurrent copies of cyanide is not recommended. It could be fine, but +if data is being modified the changes may not appear across all instances. + +Cyanide requires a working PostgreSQL database to store data in. Cyanide +attempts to create the tables it needs when it is run. + +### Docker images + +A docker image is available on [quay.io][quay.io]. It uses the default +configuration shown below, so it'll attempt to connect to a PostgreSQL database +on `localhost`, using the user `cyanide` and the database `cyanide`. If such a +database is set up and configured properly, cyanide can be run with the +following command: + +``` +docker run --rm -it --net=host quay.io/dgonyeo/cyanide +``` + +A quick explainer on the flags, `--rm` will remove any leftover container once +cyanide exits (which is fine since all state is stored in PostgreSQL), `-it` +will make the container interactive and allocate a tty for cyanide to draw to, +and `--net=host` shares the host's networking with the container, so that +cyanide will be able to access the database on `localhost`. + +To change the database configuration or editor used, it would probably be best +to mount in a modified config to `/root/.config/cyanide/cyanide.conf`. ### Binaries @@ -30,24 +63,10 @@ cd cyanide stack install ``` -### Docker images - - - -## Running cyanide - -Cyanide was developed, tested, and is actively used on Linux. It's possible it -will run without issue on MacOS or Windows, but this hasn't been attempted. - -Running concurrent copies of cyanide is not recommended. It could be fine, but -if data is being modified the changes may not appear across all instances. - -### Configuration - -Cyanide can be configured via a configuration file stored at +Once acquired, cyanide must be configured via a configuration file stored at `~/.config/cyanide/cyanide.conf`. If this file doesn't exist when cyanide is -run, the user will be asked if cyanide should create the file. If yes, the -default contents are: +run, the user will be asked if it should be created. The default file looks like +this: ``` [DATABASE] @@ -76,8 +95,11 @@ freely distributed. ## License -GPLv3 +[GPLv3][licensefile] [releases]: https://github.com/dgonyeo/cyanide/releases [stack]: https://docs.haskellstack.org/en/stable/README/ [nix]: https://nixos.org/nix/ +[quay.io]: https://quay.io/repository/dgonyeo/cyanide?tag=latest&tab=tags +[licensefile]: LICENSE +[screenshots]: screenshots