diff --git a/.envrc b/.envrc index 56917b50..df99a55f 100644 --- a/.envrc +++ b/.envrc @@ -1 +1 @@ -use nix packaging/shell.nix +use nix shell.nix diff --git a/.vscode/settings.json b/.vscode/settings.json index 6fb44f98..edc3248b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,4 +8,5 @@ "worker/__pypackages__/3.10/lib" ], "python.analysis.typeCheckingMode": "basic", + "nixEnvSelector.nixFile": "${workspaceRoot}/shell.nix", } diff --git a/doc/development_setup.md b/doc/development_setup.md index 9434cf90..8a2ead27 100644 --- a/doc/development_setup.md +++ b/doc/development_setup.md @@ -6,16 +6,16 @@ This document should get you up to speed and give you a working development envi The transcribee project uses a development-setup managed by `nix`. This allows us to all use the same software & versions conviniently. Thus, the easiest way to start is to have [a working nix installation on your system](https://nix.dev/tutorials/install-nix). -Alternatively you can install the dependencies listed in the [`shell.nix`](../packaging/shell.nix) file by +Alternatively you can install the dependencies listed in the [`shell.nix`](../shell.nix) file by hand (but that might be more inconvenient). ## Minimal setup (nix) If you just want to try out `transcribee`, you need to go through the following steps: -1. [Install `nix` on your system](https://nix.dev/tutorials/install-nix) & run `nix-shell packaging/shell.nix` to get +1. [Install `nix` on your system](https://nix.dev/tutorials/install-nix) & run `nix-shell shell.nix` to get a shell with all dependencies of `transcribee` installed. Alternatively you can install the - dependencies listed in the [`shell.nix`](../packaging/shell.nix) file by hand + dependencies listed in the [`shell.nix`](../shell.nix) file by hand (but that might be more inconvenient). 2. Run the dev script (this might take a long time as it downloads / compiles all the dependencies): execute `./packaging/dev.sh` in the root folder of the `transcribee` repo. @@ -41,7 +41,7 @@ the following steps: > do not need to restart the container: > > ```shell -> docker run -it -p 5173:5173 --mount type=bind,source="$(pwd)",target=/app --entrypoint nix-shell transcribee:latest packaging/shell.nix --command /app/packaging/dev.sh +> docker run -it -p 5173:5173 --mount type=bind,source="$(pwd)",target=/app --entrypoint nix-shell transcribee:latest shell.nix --command /app/packaging/dev.sh > ``` ## Extended setup diff --git a/packaging/Dockerfile b/packaging/Dockerfile index 9d0967ea..e0a8d452 100644 --- a/packaging/Dockerfile +++ b/packaging/Dockerfile @@ -2,23 +2,23 @@ FROM nixos/nix RUN nix-channel --update -RUN mkdir -p /app/packaging +RUN mkdir -p /app -COPY packaging/shell.nix /app/packaging +COPY shell.nix /app WORKDIR /app -RUN nix-build packaging/shell.nix +RUN nix-build shell.nix COPY . /app/ -RUN nix-shell packaging/shell.nix --command ./packaging/install_dependencies.sh -RUN nix-shell packaging/shell.nix --command ./packaging/setup_backend.sh +RUN nix-shell shell.nix --command ./packaging/install_dependencies.sh +RUN nix-shell shell.nix --command ./packaging/setup_backend.sh EXPOSE 5173 ENV MEDIA_URL_BASE=http://localhost:5173/ -ENTRYPOINT [ "nix-shell", "packaging/shell.nix", "--command" ] +ENTRYPOINT [ "nix-shell", "shell.nix", "--command" ] CMD [ "overmind start -f packaging/Procfile" ] diff --git a/packaging/shell.nix b/shell.nix similarity index 100% rename from packaging/shell.nix rename to shell.nix