Commit graph

10 commits

Author SHA1 Message Date
Peter Jones
e742614c30
rails: New systemd target for each Rails application
* Each now has a systemd target so you can start and stop all
    services together.

  * New `enable' option so you can prevent services from
    starting (e.g., on development machines)
2019-01-24 12:16:19 -07:00
Peter Jones
ab5021ec99
rails: Make nginx location unique, proxy to puma over IPv4
* Replace the @app location with a unique ID generated from the
    Rails application name

  * Puma is currently only listening on IPv4 so having nginx proxy to
    localhost wasted a connection to ::1.  The proxy address is now to
    127.0.0.1 to keep that from happening.
2019-01-08 16:52:18 -07:00
Peter Jones
14d701b388
rails: Add the ability to schedule services with a systemd timer 2019-01-07 14:05:12 -07:00
Peter Jones
72d3974626
rails: Automatically rotate log files 2019-01-04 17:08:10 -07:00
Peter Jones
4964d95974
rails: Support background workers and other Rails services/workers
The new `services' option is used to request additional processes be
run in the background with the same environment as the main Rails
process.
2019-01-04 11:17:40 -07:00
Peter Jones
193b82189e
Automatically depending on NixOps key services, new Rails sourcedFile option
* Services that need password files will automatically depend on the
    appropriate NixOps key service as necessary.

  * New `sourcedFile` option for Rails applications to load a Bash
    script just before starting the Rails service.  Useful for setting
    secret environment variables.
2019-01-03 14:33:38 -07:00
Peter Jones
b5c6563d5b
rails: Create a state directory where stateful files can live
This is necessary for files like the state file that tells the
migration script whether or not the schema needs to be loaded.

Fixes a bug where the migration script would try to load the schema on
a second deployment (since touching a file in the db directory fails
because it's in the nix store).
2018-12-21 13:10:54 -07:00
Peter Jones
b9061e43a4
security: Some settings should always be enabled
Even if Phoebe security is off, force some settings to be on.  These
are settings that are appropriate even for developer testing VMs.
2018-12-20 16:54:36 -07:00
Peter Jones
9745341307
postgresql: Add option to give a user the SUPERUSER permission
This is necessary for databases used to test Ruby on Rails
applications :(
2018-12-20 16:53:34 -07:00
Peter Jones
3980c37fa0
security, rails, postgresql: Import files from original repo 2018-12-19 16:08:03 -07:00