mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge pull request #1739 from SchrodingersGat/docker-fix
docker: Use a specific version of alpine
This commit is contained in:
commit
77f668b635
@ -1,4 +1,4 @@
|
||||
FROM python:alpine as base
|
||||
FROM alpine:3.13 as base
|
||||
|
||||
# GitHub source
|
||||
ARG repository="https://github.com/inventree/InvenTree.git"
|
||||
@ -57,7 +57,7 @@ RUN apk add --no-cache cairo cairo-dev pango pango-dev
|
||||
RUN apk add --no-cache fontconfig ttf-droid ttf-liberation ttf-dejavu ttf-opensans ttf-ubuntu-font-family font-croscore font-noto
|
||||
|
||||
# Python
|
||||
RUN apk add --no-cache python3 python3-dev
|
||||
RUN apk add --no-cache python3 python3-dev py3-pip
|
||||
|
||||
# SQLite support
|
||||
RUN apk add --no-cache sqlite
|
||||
|
@ -32,7 +32,7 @@ echo "Starting InvenTree server..."
|
||||
|
||||
# Wait for the database to be ready
|
||||
cd ${INVENTREE_HOME}/InvenTree
|
||||
python manage.py wait_for_db
|
||||
python3 manage.py wait_for_db
|
||||
|
||||
sleep 10
|
||||
|
||||
@ -40,10 +40,10 @@ echo "Running InvenTree database migrations..."
|
||||
|
||||
# We assume at this stage that the database is up and running
|
||||
# Ensure that the database schema are up to date
|
||||
python manage.py check || exit 1
|
||||
python manage.py migrate --noinput || exit 1
|
||||
python manage.py migrate --run-syncdb || exit 1
|
||||
python manage.py clearsessions || exit 1
|
||||
python3 manage.py check || exit 1
|
||||
python3 manage.py migrate --noinput || exit 1
|
||||
python3 manage.py migrate --run-syncdb || exit 1
|
||||
python3 manage.py clearsessions || exit 1
|
||||
|
||||
# Launch a development server
|
||||
python manage.py runserver ${INVENTREE_WEB_ADDR}:${INVENTREE_WEB_PORT}
|
||||
python3 manage.py runserver ${INVENTREE_WEB_ADDR}:${INVENTREE_WEB_PORT}
|
||||
|
@ -11,9 +11,9 @@ sleep 5
|
||||
|
||||
# Wait for the database to be ready
|
||||
cd InvenTree
|
||||
python manage.py wait_for_db
|
||||
python3 manage.py wait_for_db
|
||||
|
||||
sleep 10
|
||||
|
||||
# Now we can launch the background worker process
|
||||
python manage.py qcluster
|
||||
python3 manage.py qcluster
|
||||
|
@ -23,7 +23,7 @@ echo "Starting InvenTree server..."
|
||||
|
||||
# Wait for the database to be ready
|
||||
cd $INVENTREE_MNG_DIR
|
||||
python manage.py wait_for_db
|
||||
python3 manage.py wait_for_db
|
||||
|
||||
sleep 10
|
||||
|
||||
@ -31,12 +31,12 @@ echo "Running InvenTree database migrations and collecting static files..."
|
||||
|
||||
# We assume at this stage that the database is up and running
|
||||
# Ensure that the database schema are up to date
|
||||
python manage.py check || exit 1
|
||||
python manage.py migrate --noinput || exit 1
|
||||
python manage.py migrate --run-syncdb || exit 1
|
||||
python manage.py prerender || exit 1
|
||||
python manage.py collectstatic --noinput || exit 1
|
||||
python manage.py clearsessions || exit 1
|
||||
python3 manage.py check || exit 1
|
||||
python3 manage.py migrate --noinput || exit 1
|
||||
python3 manage.py migrate --run-syncdb || exit 1
|
||||
python3 manage.py prerender || exit 1
|
||||
python3 manage.py collectstatic --noinput || exit 1
|
||||
python3 manage.py clearsessions || exit 1
|
||||
|
||||
# Now we can launch the server
|
||||
gunicorn -c $INVENTREE_HOME/gunicorn.conf.py InvenTree.wsgi -b 0.0.0.0:$INVENTREE_WEB_PORT
|
@ -6,9 +6,9 @@ sleep 5
|
||||
|
||||
# Wait for the database to be ready
|
||||
cd $INVENTREE_MNG_DIR
|
||||
python manage.py wait_for_db
|
||||
python3 manage.py wait_for_db
|
||||
|
||||
sleep 10
|
||||
|
||||
# Now we can launch the background worker process
|
||||
python manage.py qcluster
|
||||
python3 manage.py qcluster
|
Loading…
Reference in New Issue
Block a user