Skip to content

Commit

Permalink
√ Move shell.nix to project root
Browse files Browse the repository at this point in the history
  • Loading branch information
phlmn authored and pajowu committed Jul 26, 2023
1 parent 5b9096f commit bb49345
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
use nix packaging/shell.nix
use nix shell.nix
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
"worker/__pypackages__/3.10/lib"
],
"python.analysis.typeCheckingMode": "basic",
"nixEnvSelector.nixFile": "${workspaceRoot}/shell.nix",
}
8 changes: 4 additions & 4 deletions doc/development_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions packaging/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
File renamed without changes.

0 comments on commit bb49345

Please sign in to comment.