GithubHelp home page GithubHelp logo

grafted-in / wordpress-nginx-nix Goto Github PK

View Code? Open in Web Editor NEW
45.0 45.0 8.0 87 KB

One-stop shop for defining, testing, and deploying a WordPress CMS site using Nginx with Nix, NixOps, and NixOS

Nix 91.19% Shell 8.81%
deploy linux nix nixops virtualbox wordpress wordpress-cms

wordpress-nginx-nix's Issues

Use a nix file to pin nixpkgs

Right now nixpkgs is pinned by the nixpkgs-version.sh script as part of deploy/manage. This works but it's not possible to refer to that nixpkgs version from within a nix derivation. This makes it hard to create a fully pinned repo. Move the nixpkgs version to a .nix file and import it in the deploy/manage script.

Skip WP installation

@3noch Is it possible to configure the site from the configuration (Site title, Username, etc)? Now I get the installation wizard asking me to setup the site.

Edit: I'm thinking something like this, but realising that this is out of scope. Nice to have :)

Update to use NixOS 17.09

Some significant changes were made to how PHP-FPM is served and I think it may require some refactoring to support it.

Move all secrets to a common directory?

@niklaswallerstedt had the idea of putting all files that need to be kept secret in one directory. This would remove a some complexity and add predictability. Up till now I've been relying on git-crypt status -e to tell me what files are encrypted, which works pretty well. But there is an advantage to having a very simple scheme to know which files will be encrypted and which ones won't. Another possible benefit to putting everything in one directory is that it would make it much easier to pull those files out into submodule, which could be a git repo with different permissions. It could even be symlinked to a vault of some sort.

The only downside is that it's a bit more awkward to reference several totally unrelated files that are all in one directory. The natural organization scheme you'd expect gets broken. I'm not sure this is a meaningful problem though in a small project like this.

Any other thoughts?

Add rolling backups module

I've written a lot of functions to set up rolling backups that could be generally useful. I need to turn them into a NixOS module and include them here, or via some other repo.

Demo how to use this setup for a site without copying the code

With nix or subrepos it's entirely possible to create a site configuration that doesn't require you to copy this entire repo's source code into a new repo. That would be preferable for simple sites since they can effectively avoid "forking" this code base and continue to benefit from future enhancements/fixes.

The README needs to show how to do this.

Attempt to call something which is not a function but a set

This seems like a very interesting repo, however I'm having some trouble getting it to run on Virtualbox on my mac. I'm new to Nix, so maybe I'm missing something. Any help would be appreciated.

deploy/manage vbox create '<server/logical.vbox.nix>' '<server/physical.vbox.nix>'
created deployment ‘7c1eaaf3...'
deploy/manage vbox deploy
error: attempt to call something which is not a function but a set, at ... wordpress-nginx-nix/server/physical.vbox.nix:1:6
deploy/manage vbox deploy --show-trace
error: while evaluating ‘flip’ at /nix/store/1lgppap4jzgw7gq8zdnma4pfcsm1ggqq-nixexprs.tar.xz/lib/trivial.nix:82:16, called from /nix/store/acwqszlzgai4h1dl8rvspbd439l633va-1gy62jcxjc09n9gk0ns4qk3d9b9kcda7-nixops-1.5pre2121_fc43d9c/share/nix/nixops/eval-machine-info.nix:264:7:
while evaluating ‘mapAttrs’ at /nix/store/1lgppap4jzgw7gq8zdnma4pfcsm1ggqq-nixexprs.tar.xz/lib/attrsets.nix:198:17, called from /nix/store/1lgppap4jzgw7gq8zdnma4pfcsm1ggqq-nixexprs.tar.xz/lib/trivial.nix:82:19:
while evaluating ‘zipAttrsWith’ at /nix/store/1lgppap4jzgw7gq8zdnma4pfcsm1ggqq-nixexprs.tar.xz/lib/attrsets.nix:346:21, called from /nix/store/acwqszlzgai4h1dl8rvspbd439l633va-1gy62jcxjc09n9gk0ns4qk3d9b9kcda7-nixops-1.5pre2121_fc43d9c/share/nix/nixops/eval-machine-info.nix:31:13:
while evaluating ‘zipAttrsWithNames’ at /nix/store/1lgppap4jzgw7gq8zdnma4pfcsm1ggqq-nixexprs.tar.xz/lib/attrsets.nix:331:33, called from /nix/store/1lgppap4jzgw7gq8zdnma4pfcsm1ggqq-nixexprs.tar.xz/lib/attrsets.nix:346:27:
while evaluating ‘concatMap’ at /nix/store/1lgppap4jzgw7gq8zdnma4pfcsm1ggqq-nixexprs.tar.xz/lib/lists.nix:79:18, called from /nix/store/1lgppap4jzgw7gq8zdnma4pfcsm1ggqq-nixexprs.tar.xz/lib/attrsets.nix:346:46:
while evaluating ‘operator’ at /nix/store/acwqszlzgai4h1dl8rvspbd439l633va-1gy62jcxjc09n9gk0ns4qk3d9b9kcda7-nixops-1.5pre2121_fc43d9c/share/nix/nixops/eval-machine-info.nix:25:20, called from undefined position:
while evaluating ‘getNetworkFromExpr’ at /nix/store/acwqszlzgai4h1dl8rvspbd439l633va-1gy62jcxjc09n9gk0ns4qk3d9b9kcda7-nixops-1.5pre2121_fc43d9c/share/nix/nixops/eval-machine-info.nix:18:28, called from /nix/store/acwqszlzgai4h1dl8rvspbd439l633va-1gy62jcxjc09n9gk0ns4qk3d9b9kcda7-nixops-1.5pre2121_fc43d9c/share/nix/nixops/eval-machine-info.nix:25:45:
while evaluating ‘call’ at /nix/store/acwqszlzgai4h1dl8rvspbd439l633va-1gy62jcxjc09n9gk0ns4qk3d9b9kcda7-nixops-1.5pre2121_fc43d9c/share/nix/nixops/eval-machine-info.nix:29:10, called from /nix/store/acwqszlzgai4h1dl8rvspbd439l633va-1gy62jcxjc09n9gk0ns4qk3d9b9kcda7-nixops-1.5pre2121_fc43d9c/share/nix/nixops/eval-machine-info.nix:19:10:
while evaluating the file ‘... wordpress-nginx-nix/server/physical.vbox.nix’:
attempt to call something which is not a function but a set, at ... wordpress-nginx-nix/server/physical.vbox.nix:1:6
error: evaluation of the deployment specification failed

macOS 10.12.3
nix-env (Nix) 1.11.6
NixOps 1.5 (installed prior to finding this repo)
Virtualbox 5.0.16r105871

Add support for secure redirection

Redirecting from http://www.site.com to https://site.com works, but not https://www.site.com to https://site.com. This is easy to add, just need to do it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.