Skip to content

Instantly share code, notes, and snippets.

@erikarvstedt
Created September 18, 2018 08:43
Show Gist options
  • Save erikarvstedt/5466559fb0bdb24f5d6ddf628d95816d to your computer and use it in GitHub Desktop.
Save erikarvstedt/5466559fb0bdb24f5d6ddf628d95816d to your computer and use it in GitHub Desktop.
FROM nixos/nix
RUN nix-build --out-link /bin/paperless -E ' \
with (import <nixpkgs> {}); \
let \
pkgs = import (fetchFromGitHub { \
owner = "erikarvstedt"; \
repo = "nixpkgs"; \
rev = "paperless-django2"; \
sha256 = "1wcrsf7ai8m5r855dcdw434qs8zc96bc5zw8y2zpya3jxr1spc8i"; \
}) {}; \
in \
pkgs.paperless-django2.withConfig { \
dataDir = /tmp/paperless-django2; \
config = { \
PAPERLESS_DISABLE_LOGIN = "true"; \
}; \
} \
'
## Uncomment this to run paperless with Django 1
# RUN nix-build --out-link /bin/paperless -E ' \
# with (import <nixpkgs> {}); \
# let \
# pkgs = import (fetchFromGitHub { \
# owner = "erikarvstedt"; \
# repo = "nixpkgs"; \
# rev = "paperless-django2"; \
# sha256 = "1wcrsf7ai8m5r855dcdw434qs8zc96bc5zw8y2zpya3jxr1spc8i"; \
# }) {}; \
# in \
# pkgs.paperless.withConfig { \
# dataDir = /tmp/paperless-django2; \
# config = { \
# PAPERLESS_DISABLE_LOGIN = "true"; \
# }; \
# } \
# '
CMD /bin/paperless migrate && \
/bin/paperless runserver --noreload 0.0.0.0:80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment