Commit graph

20 commits

Author SHA1 Message Date
Peter Jones
b1ed1aff0f
Add web tunnels (aimed at web developers) 2019-02-13 13:45:29 -07:00
Peter Jones
2218deea5e
secrets: Use /dev/shm if available, then fallback to tmpfs 2019-02-01 09:02:56 -07:00
Peter Jones
88a7a614ef
New `builder' service for configuring a remote build machine 2019-02-01 08:33:26 -07:00
Peter Jones
b537635028
rails: New script `railsdo' and rename home symlink to the app
* New script `railsdo' to help run commands as a rails user

  * The symlink in the home directory is now always called `app'.  It
    was previously named after the application itself.
2019-01-28 16:21:37 -07:00
Peter Jones
6c7065945c
New module for nginx 2019-01-28 14:10:57 -07:00
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
eaa5c89f6b
Linode: Don't reboot after installing NixOS so we have a chance to set the root password
Apparently the nixos-install tool locks the root account of stdin
isn't a terminal.  This change makes it so the root user doesn't have
a password and then blasts out a warning with instructions on how to
set the root password.
2019-01-14 10:52:24 -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
48e5035383
scripts: Add a script to bootstrap NixOS on Linode.com 2019-01-04 17:09:22 -07:00
Peter Jones
72d3974626
rails: Automatically rotate log files 2019-01-04 17:08:10 -07:00
Peter Jones
c5dc7d83be
secrets: Try to improve size estimates for the tmpfs
When creating the tmpfs we need to specify a size.  Calculate the size
based on the size of the tarball of the encrypted files, multiplied by
10.
2019-01-04 11:19:15 -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
accdc1bf54
When decrypting secrets, pass unencrypted files straight through 2019-01-03 14:32:11 -07:00
Peter Jones
b2571a8c30
Add a script to help manage secrets
Current features:

  * Mount a directory of encrypted secrets into a memory file system

  * Unmount the file system created by the mount command
2019-01-02 16:09:31 -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