diff --git a/Dockerfile b/Dockerfile index f56422a8e..a7ea8b70f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -239,6 +239,7 @@ COPY --from=compile-frontend --chown=1000:1000 /src/src/documents/static/fronten # add users, setup scripts # Mount the compiled frontend to expected location RUN set -eux \ + && sed -i '1s|^#!/usr/bin/env python3|#!/command/with-contenv python3|' manage.py \ && echo "Setting up user/group" \ && addgroup --gid 1000 paperless \ && useradd --uid 1000 --gid paperless --home-dir /usr/src/paperless paperless \ diff --git a/docker/compose/docker-compose.mariadb-tika.yml b/docker/compose/docker-compose.mariadb-tika.yml index c158797a5..73f30da78 100644 --- a/docker/compose/docker-compose.mariadb-tika.yml +++ b/docker/compose/docker-compose.mariadb-tika.yml @@ -24,7 +24,7 @@ # - Copy this file as 'docker-compose.yml' and the files 'docker-compose.env' # and '.env' into a folder. # - Run 'docker compose pull'. -# - Run 'docker compose run --rm webserver createsuperuser' to create a user. +# - Run 'docker compose run --rm webserver ./manage.py createsuperuser' to create a user. # - Run 'docker compose up -d'. # # For more extensive installation and update instructions, refer to the diff --git a/docker/compose/docker-compose.mariadb.yml b/docker/compose/docker-compose.mariadb.yml index 0b7a0fd3e..2a00a0be6 100644 --- a/docker/compose/docker-compose.mariadb.yml +++ b/docker/compose/docker-compose.mariadb.yml @@ -20,7 +20,7 @@ # - Copy this file as 'docker-compose.yml' and the files 'docker-compose.env' # and '.env' into a folder. # - Run 'docker compose pull'. -# - Run 'docker compose run --rm webserver createsuperuser' to create a user. +# - Run 'docker compose run --rm webserver ./manage.py createsuperuser' to create a user. # - Run 'docker compose up -d'. # # For more extensive installation and update instructions, refer to the diff --git a/docker/compose/docker-compose.portainer.yml b/docker/compose/docker-compose.portainer.yml index 2132c67a6..f655131eb 100644 --- a/docker/compose/docker-compose.portainer.yml +++ b/docker/compose/docker-compose.portainer.yml @@ -24,7 +24,7 @@ # - Click 'Deploy the stack' and wait for it to be deployed # - Open the list of containers, select paperless_webserver_1 # - Click 'Console' and then 'Connect' to open the command line inside the container -# - Run 'python3 manage.py createsuperuser' to create a user +# - Run 'python3 manage.py ./manage.py createsuperuser' to create a user # - Exit the console # # For more extensive installation and update instructions, refer to the diff --git a/docker/compose/docker-compose.postgres-tika.yml b/docker/compose/docker-compose.postgres-tika.yml index 60bfada5f..fdd794275 100644 --- a/docker/compose/docker-compose.postgres-tika.yml +++ b/docker/compose/docker-compose.postgres-tika.yml @@ -24,7 +24,7 @@ # - Copy this file as 'docker-compose.yml' and the files 'docker-compose.env' # and '.env' into a folder. # - Run 'docker compose pull'. -# - Run 'docker compose run --rm webserver createsuperuser' to create a user. +# - Run 'docker compose run --rm webserver ./manage.py createsuperuser' to create a user. # - Run 'docker compose up -d'. # # For more extensive installation and update instructions, refer to the diff --git a/docker/compose/docker-compose.postgres.yml b/docker/compose/docker-compose.postgres.yml index da2953b7b..eeb9ddfa2 100644 --- a/docker/compose/docker-compose.postgres.yml +++ b/docker/compose/docker-compose.postgres.yml @@ -20,7 +20,7 @@ # - Copy this file as 'docker-compose.yml' and the files 'docker-compose.env' # and '.env' into a folder. # - Run 'docker compose pull'. -# - Run 'docker compose run --rm webserver createsuperuser' to create a user. +# - Run 'docker compose run --rm webserver ./manage.py createsuperuser' to create a user. # - Run 'docker compose up -d'. # # For more extensive installation and update instructions, refer to the diff --git a/docker/compose/docker-compose.sqlite-tika.yml b/docker/compose/docker-compose.sqlite-tika.yml index 54292a845..a6340b166 100644 --- a/docker/compose/docker-compose.sqlite-tika.yml +++ b/docker/compose/docker-compose.sqlite-tika.yml @@ -24,7 +24,7 @@ # - Copy this file as 'docker-compose.yml' and the files 'docker-compose.env' # and '.env' into a folder. # - Run 'docker compose pull'. -# - Run 'docker compose run --rm webserver createsuperuser' to create a user. +# - Run 'docker compose run --rm webserver ./manage.py createsuperuser' to create a user. # - Run 'docker compose up -d'. # # For more extensive installation and update instructions, refer to the diff --git a/docker/compose/docker-compose.sqlite.yml b/docker/compose/docker-compose.sqlite.yml index 1ca5fe86b..92c126bca 100644 --- a/docker/compose/docker-compose.sqlite.yml +++ b/docker/compose/docker-compose.sqlite.yml @@ -17,7 +17,7 @@ # - Copy this file as 'docker-compose.yml' and the files 'docker-compose.env' # and '.env' into a folder. # - Run 'docker compose pull'. -# - Run 'docker compose run --rm webserver createsuperuser' to create a user. +# - Run 'docker compose run --rm webserver ./manage.py createsuperuser' to create a user. # - Run 'docker compose up -d'. # # For more extensive installation and update instructions, refer to the diff --git a/docs/setup.md b/docs/setup.md index 7bb71a761..d3f43aca7 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -135,7 +135,7 @@ account. The script essentially automatically performs the steps described in [D execute the following command: ```shell-session - docker compose run --rm webserver createsuperuser + docker compose run --rm webserver ./manage.py createsuperuser ``` or using docker exec from within the container: diff --git a/install-paperless-ngx.sh b/install-paperless-ngx.sh index 3977cece9..d901353a3 100755 --- a/install-paperless-ngx.sh +++ b/install-paperless-ngx.sh @@ -402,6 +402,6 @@ if [ "$DATABASE_BACKEND" == "postgres" ] || [ "$DATABASE_BACKEND" == "mariadb" ] docker compose stop fi -docker compose run --rm -e DJANGO_SUPERUSER_PASSWORD="$PASSWORD" webserver createsuperuser --noinput --username "$USERNAME" --email "$EMAIL" +docker compose run --rm -e DJANGO_SUPERUSER_PASSWORD="$PASSWORD" webserver ./manage.py createsuperuser --noinput --username "$USERNAME" --email "$EMAIL" docker compose up --detach