mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Merge branch 'paperless-ngx:dev' into dev
This commit is contained in:
commit
818d383f2e
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
@ -196,9 +196,8 @@ jobs:
|
|||||||
images: ghcr.io/${{ github.repository }}
|
images: ghcr.io/${{ github.repository }}
|
||||||
tags: |
|
tags: |
|
||||||
type=match,pattern=ngx-(\d.\d.\d),group=1
|
type=match,pattern=ngx-(\d.\d.\d),group=1
|
||||||
type=semver,pattern=ngx-{{version}}
|
type=ref,event=branch
|
||||||
type=semver,pattern=ngx-{{major}}.{{minor}}
|
type=ref,event=tag
|
||||||
type=ref
|
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
@ -47,24 +47,29 @@ if [[ $(id -u) == "0" ]] ; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $(which wget) ]] ; then
|
if ! command -v wget &> /dev/null ; then
|
||||||
echo "wget executable not found. Is wget installed?"
|
echo "wget executable not found. Is wget installed?"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $(which docker) ]] ; then
|
if ! command -v docker &> /dev/null ; then
|
||||||
echo "docker executable not found. Is docker installed?"
|
echo "docker executable not found. Is docker installed?"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $(which docker-compose) ]] ; then
|
DOCKER_COMPOSE_CMD="docker-compose"
|
||||||
echo "docker-compose executable not found. Is docker-compose installed?"
|
if ! command -v ${DOCKER_COMPOSE_CMD} ; then
|
||||||
exit 1
|
if docker compose version &> /dev/null ; then
|
||||||
|
DOCKER_COMPOSE_CMD="docker compose"
|
||||||
|
else
|
||||||
|
echo "docker-compose executable not found. Is docker-compose installed?"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if user has permissions to run Docker by trying to get the status of Docker (docker status).
|
# Check if user has permissions to run Docker by trying to get the status of Docker (docker status).
|
||||||
# If this fails, the user probably does not have permissions for Docker.
|
# If this fails, the user probably does not have permissions for Docker.
|
||||||
if [ ! "$(docker stats --no-stream 2>/dev/null 1>&2)" ] ; then
|
if ! docker stats --no-stream &> /dev/null ; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "WARN: It look like the current user does not have Docker permissions."
|
echo "WARN: It look like the current user does not have Docker permissions."
|
||||||
echo "WARN: Use 'sudo usermod -aG docker $USER' to assign Docker permissions to the user."
|
echo "WARN: Use 'sudo usermod -aG docker $USER' to assign Docker permissions to the user."
|
||||||
@ -351,8 +356,8 @@ if [ "$l1" -eq "$l2" ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
docker-compose pull
|
${DOCKER_COMPOSE_CMD} pull
|
||||||
|
|
||||||
docker-compose run --rm -e DJANGO_SUPERUSER_PASSWORD="$PASSWORD" webserver createsuperuser --noinput --username "$USERNAME" --email "$EMAIL"
|
${DOCKER_COMPOSE_CMD} run --rm -e DJANGO_SUPERUSER_PASSWORD="$PASSWORD" webserver createsuperuser --noinput --username "$USERNAME" --email "$EMAIL"
|
||||||
|
|
||||||
docker-compose up -d
|
${DOCKER_COMPOSE_CMD} up -d
|
||||||
|
Loading…
x
Reference in New Issue
Block a user