Created
June 17, 2024 19:46
-
-
Save goldenratio/5b6447a253dacb05a934083261c0bbf6 to your computer and use it in GitHub Desktop.
A Nix Flake for running FusionAuth with Docker Compose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
description = "A Nix Flake for running FusionAuth with Docker Compose"; | |
inputs = { | |
nixpkgs.url = "github:NixOS/nixpkgs"; | |
}; | |
outputs = { self, nixpkgs }: | |
let | |
# The set of systems to provide outputs for | |
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; | |
# A function that provides a system-specific Nixpkgs for the desired systems | |
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f { | |
pkgs = import nixpkgs { inherit system; }; | |
}); | |
in { | |
packages = forAllSystems ({ pkgs }: { | |
default = pkgs.mkShell { | |
# Package definition | |
name = "test-brr-nix"; | |
packages = with pkgs; [ podman podman-compose curl ]; | |
shellHook = '' | |
echo "Welcome to a Nix development environment for Fermi!" | |
podman pull fusionauth/fusionauth-app:latest && \ | |
curl -fsSL https://raw.githubusercontent.com/FusionAuth/fusionauth-containers/master/docker/fusionauth/docker-compose.yml > docker-compose.yml && \ | |
curl -fsSL https://raw.githubusercontent.com/FusionAuth/fusionauth-containers/master/docker/fusionauth/.env > .env && \ | |
podman compose up | |
''; | |
}; | |
}); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment