Commit 669cc7f0 authored by sim's avatar sim

Gargantext setup: migrate database to latest version

parent 43094957
.PHONY: gargantext env conf .PHONY: gargantext venv envs migrate conf
ifeq ($(TARGET), "prod") ifeq ($(TARGET), "prod")
TARG=prod TARG=prod
...@@ -12,17 +12,25 @@ VENV=$(shell pipenv --venv) ...@@ -12,17 +12,25 @@ VENV=$(shell pipenv --venv)
PYTHON=$(shell pipenv --py) PYTHON=$(shell pipenv --py)
PY_VERSION=$(shell $(PYTHON) -c 'import sys; v=sys.version_info; print("{0}.{1}".format(*v))') PY_VERSION=$(shell $(PYTHON) -c 'import sys; v=sys.version_info; print("{0}.{1}".format(*v))')
gargantext: conf env gargantext: venv migrate conf
@echo "• Installing dependencies..."
venv: envs
@echo "• Setup virtualenv with all dependencies..."
pipenv install $(PIPENV_ARGS) pipenv install $(PIPENV_ARGS)
@# Put current directory in python path to be able to import gargantext @# Put current directory in python path to be able to import gargantext
@# from scripts in sub-directories (eg. alembic revisions) @# from scripts in sub-directories (eg. alembic revisions)
@pwd > $(VENV)/lib/python$(PY_VERSION)/site-packages/gargantext.pth @pwd > $(VENV)/lib/python$(PY_VERSION)/site-packages/gargantext.pth
@echo @echo
env: envs:
@echo "• Setup django settings module and configuration path..." @echo "• Setup django settings module and configuration path..."
./tools/mkenv.sh ./tools/mkenvs.sh
@echo
migrate:
@echo "• Migrate database to latest version..."
pipenv run ./manage.py migrate
pipenv run alembic upgrade head
@echo @echo
conf: conf:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment