diff --git a/README b/README index a46dd3a..1ae3037 100644 --- a/README +++ b/README @@ -24,21 +24,13 @@ You shouldn't. This is free and open-source software which you can run on your o DEPLOYMENT -purr is intended to run in a docker container. -This repo's Stack project is configured to use a musl-based docker container for builds. -Assuming your working directory is inside of this repository: +Use Nix with flakes enabled. -1. Copy "examples/config.dhall" to ./config.dhall - configure this file appropriately. - - Use `openssl rand -hex 10` to generate an encryption key for "dbKey" -2. Copy "examples/Dockerfile" to ./Dockerfile -3. If using default database file location, run: `mkdir ./data; touch ./data/Purr.sqlite` -4. Run `chmod +x build-docker` -5. Run `./build-docker $IMAGE_NAME` to complete the initial Stack build and create the container -6. Orchestrate the container as desired - - docker run -d -v "$(pwd -P)/data/Purr.sqlite:/app/data/Purr.sqlite" \ - -v "$(pwd -P)/config.dhall:/app/config.dhall" \ - -p 5195:3000 purr - |- An example docker-stack.yml is provided: `docker stack deploy -c docker-stack.yml purr` +Build binary and run natively: +nix build && ./result/bin/Purr-musl + +Build and add Docker image to local registry: +nix build .#purrImage --impure && docker load < result DEVELOPMENT & SUPPORT diff --git a/TODO b/TODO new file mode 100644 index 0000000..dbe7c70 --- /dev/null +++ b/TODO @@ -0,0 +1,2 @@ +- Replace crypto-simple dependency +- Make the Docker images much smaller again