bradparker / servant-beam-realworld-example-app

Exemplary fullstack Medium.com clone powered by Servant and Beam
BSD 3-Clause "New" or "Revised" License
33 stars 6 forks source link

.envrc ignored by direnv #2

Open antislava opened 5 years ago

antislava commented 5 years ago

Apparently, eval "$(direnv hook <shell>)" needs to be run, in which case it has be mentioned in the README.md. This command can also be added to the respective ~/.<shell>rc, or, better yet, to the shellHook of the shell.nix (probably along with direnv allow?):

    shellHook = drv.shellHook + ''
      export PGDATA=$PWD/database/pgdata
      mkdir -p $PGDATA

      mkdir -p $PWD/logs

      eval "$(direnv hook $SHELL)"
      direnv allow
    '';
bradparker commented 5 years ago

Hey, thanks! I'll give it a shot later this evening. I really need to do a little testing with --pure to make sure that the nix setup is as plug and play as I'd like it to be.

Did you otherwise get it running OK? My other concern is the PostgreSQL setup ... I get a left-over pid file from time to time.

antislava commented 5 years ago

Yes, everything worked really well (I haven't looked into it in much detail yet but all the tests passed OK, haven't noticed any issues with the PostgreSQL setup, but I am planning to continue playing with it).

Thanks for your work - I think this kind of complete examples are really useful!

ps you may also want to take a look at https://github.com/basvandijk/nixtodo (a fullstack web-app, implementing alternative deployment options using nixops), if you haven't seen it already.

bradparker commented 5 years ago

No worries. I've been meaning to share this around for a couple of weeks actually, so I'm really glad you found it. There are still a few more things I'd like to have before it's really complete. I'd really like metrics and error reporting (or something along those lines).

Thanks for the link, I'm very keen to see more NixOps strategies. Also Hydra, I haven't look into setting up a Hydra server at all yet. This Nix stuff, it's real good :)