Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some info related to manage.py (docker exec) #75

Closed
Raruto opened this issue Sep 22, 2022 · 1 comment · Fixed by #85
Closed

Add some info related to manage.py (docker exec) #75

Raruto opened this issue Sep 22, 2022 · 1 comment · Fixed by #85
Labels
docs Improvements or additions to documentation

Comments

@Raruto
Copy link
Collaborator

Raruto commented Sep 22, 2022

For admin users it might be quite useful to know how to correctly run the manage.py command (ie. adding the -e DISPLAY=:99 and -w /code/g3w-admin parameters):

docker exec -it -e DISPLAY=:99 -w /code/g3w-admin <CONTAINER ID / NAME> python3 manage.py

Currently (v3.4) the only reference to the DISPLAY environment variable is quite hidden within the editing section:

Editing module is active by default, to avoid simultaneous feature editing by two or more users, the editing module works with a feature lock system.
This locking system can remain active if users do not exit the editing state correctly, to avoid this it is advisable to activate a cron job on host machine that checks the features that have been locked for more than 4 hours and frees them:

0 */1 * * * docker exec -e DISPLAY=:99 g3w-suite-docker_g3w-suite_1 python3 /code/g3w-admin/manage.py check_features_locked

Related to: g3w-suite/g3w-client#183

@Raruto Raruto added the docs Improvements or additions to documentation label Sep 22, 2022
@Raruto Raruto changed the title Add some info related to manage.py (docker exec) Add some info related to manage.py (docker exec) Sep 22, 2022
@Raruto
Copy link
Collaborator Author

Raruto commented Sep 22, 2022

BTW, the DISPLAY value could also be passed as an environment variable through docker-compose.yml

For example, within the docker-compose-dev.yml:

g3w-suite:
  image: g3wsuite/g3w-suite:dev
  environment:
    - DISPLAY=:99
    - G3WSUITE_TILECACHE_PATH
    ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant