Skip to content
Snippets Groups Projects
Commit 55845064 authored by Jan Mach's avatar Jan Mach
Browse files

Updated Vagrant based development documentation to be more clear.

(Redmine issue: #7041)
parent 282793be
No related branches found
No related tags found
No related merge requests found
......@@ -501,7 +501,7 @@ data-fetch-dbsnapshot: FORCE
data-import-dbsnapshot: FORCE
@echo "\n$(GREEN)*** Importing latest production database dump ***$(NC)\n"
@sudo -u postgres pg_restore --verbose --format=d --dbname=mentat_main ./data/devsnapshot/main
@sudo -u postgres pg_restore --verbose --clean --if-exists --format=d --dbname=mentat_main ./data/devsnapshot/main
@sudo -u postgres psql mentat_main -c "COPY reports_events ($(cat /vagrant/data/devsnapshot/main/reports_events.cols)) FROM stdin;" < ./data/devsnapshot/chunks/reports_events.dat
@sudo -u postgres psql mentat_main -c "COPY statistics_events ($(cat /vagrant/data/devsnapshot/main/statistics_events.cols)) FROM stdin;" < ./data/devsnapshot/chunks/statistics_events.dat
@sudo -u postgres psql mentat_main -c "COPY changelogs_items ($(cat /vagrant/data/devsnapshot/main/changelogs_items.cols)) FROM stdin;" < ./data/devsnapshot/chunks/changelogs_items.dat
......
......@@ -690,12 +690,24 @@ initial tips:
.. code-block:: shell
# Alias to quickly sudo su to mentat system user
sm # Stands for 'sudoSuMentat'
# Alias to quickly sudo su to vagrant system user
sv # Stands for 'sudoSuVagrant'
# Alias to quickly enter work directory:
wd # Stands for 'WorkDirectory'
# Alias to enable Python virtual environment:
ve # Stands for 'VirtualEnvironment'
Basically you should execute both of these aliases in succesion to end up with a prompt like this
The ``mentat`` user is the system user preconfigured to run Mentat. The ``vagrant`` user is a system user that owns
all project files. If you need to execute Mentat scripts and daemons, you should always switch to ``mentat``
user. If you need to work with the files and Vagrant box, you should always switch to ``vagrant`` user.
It is possible, that both of these user accounts will be merged in the future. However now the roles
are kept separate, because the usage of ``mentat`` user mimics the environment on production and ``vagrant`` user
is deeply baked into Vagrant and the change could be distruptive. By default by executing ``vagrant ssh``
command you will be connected as vagrant user.
Basically you should always execute ``ve`` alias to activate virtual environment and to end up with a prompt like this
and be ready to work:
.. code-block:: shell
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment