All checks were successful
Tests / test (push) Successful in 32s
Same move as asxpio: ruby:4.0.9-slim-bookworm and nixpkgs' ruby_4_0 (4.0.9) for the tests; BUNDLE_WITHOUT instead of Bundler 4's removed --without; Puma started through bundle exec, so the lockfile picks the gems and not Ruby 4's newer defaults (asxpio crash-looped on bigdecimal 4.0.1 without it). Lockfile stays BUNDLED WITH 2.7.2. Checked on ops with the production env, as a separate container: boots to Listening on Ruby 4.0.9 and serves / (302, as production does). Assisted-by: Claude:opus-5-5
46 lines
1.1 KiB
Nix
46 lines
1.1 KiB
Nix
{
|
|
description = "Datacenter bingo (datacenterbingo.xyz)";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
};
|
|
|
|
outputs = { self, nixpkgs }:
|
|
let
|
|
system = "x86_64-linux";
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
in
|
|
{
|
|
devShells.${system}.default = pkgs.mkShell {
|
|
buildInputs = [
|
|
pkgs.ruby_4_0
|
|
pkgs.bundler
|
|
pkgs.openssl
|
|
pkgs.zlib
|
|
pkgs.libyaml
|
|
pkgs.postgresql.lib
|
|
pkgs.postgresql
|
|
];
|
|
|
|
shellHook = ''
|
|
export GEM_HOME="$PWD/.gems"
|
|
export PATH="$GEM_HOME/bin:$PATH"
|
|
export BUNDLE_PATH="$GEM_HOME"
|
|
|
|
if [ -f .env ]; then
|
|
set -a
|
|
source .env
|
|
set +a
|
|
fi
|
|
|
|
if [ ! -f .gems/.bundled ] || [ Gemfile -nt .gems/.bundled ]; then
|
|
echo "Installing gems..."
|
|
bundle install --quiet && mkdir -p .gems && touch .gems/.bundled
|
|
fi
|
|
|
|
echo "bingo dev shell ready"
|
|
echo " bundle exec rerun -- rackup -p 3000 - start with auto-reload"
|
|
'';
|
|
};
|
|
};
|
|
}
|