(08-02-2020, 09:53 PM)Diego Wrote: Hi Gary,
I'am working on a better version too, suited for a docker compose script where tactic, apache and postgres are on different containers.
I've been a bit too busy at works and hadn't much time to work on it.
The biggest problem is that tactic uses psql directly for some operation, like the creation of a new database, another point is making it possible to delete and recreate a container while keeping all the data, this imply changing the tactic install script quite a bit or writing a new one just for docker.
In your case I think the tacticenv package is not correctly installed in the python path
There is also another problem related to the fact that the tactic install path was moved from /home/apache to /opt/tactic and the install script creates tactic_temp in /opt/tactic/tactic_temp but your dockerfile does:
COPY tactic_linux-conf.xml /opt/tactic/tactic_data/config/tactic-conf.xml
and your tactic_linux-conf.xml has:
<tmp_dir>/home/apache/tactic_temp</tmp_dir>
Thanks for your comments Diego. I've made those changes to my config, docker-compose and Dockerfile. Now I'll investigate my environment issue (python newbie.)
Regarding persistent data: Have a look at the Docker documentation for Volumes. It's what I'm doing with my set-up so data can remain separate from the running containers. No need to change the install script.
In the config I've changed localhost to db for the database host. I'm hoping the tactic container can pick this up for database operations -- but I haven't gotten far enough to confirm but I'm confident it can work.
tacticenv did get installed to the image/container...
Code:
docker-compose run -u root -v tactic:/opt/tactic --entrypoint bash tactic
root@b3fa94b64699:/opt/tactic# ls -lah /usr/local/lib/python3.7/site-packages/tacticenv/
total 20K
drwxr-sr-x 3 root staff 4.0K Aug 3 15:32 .
drwxr-sr-x 1 root staff 4.0K Aug 3 15:32 ..
-rw-r--r-- 1 root staff 2.0K Aug 3 15:32 __init__.py
drwxr-sr-x 2 root staff 4.0K Aug 3 15:32 __pycache__
-rw-r--r-- 1 root staff 437 Aug 3 15:32 tactic_paths.py
---
Noticed some pull requests were merged. Seems to get a little further...
Code:
tactic_1 | Traceback (most recent call last):
tactic_1 | File "src/bin/startup_dev.py", line 24, in <module>
tactic_1 | from pyasm.common import Environment, Config
tactic_1 | File "/opt/tactic/tactic/src/pyasm/common/__init__.py", line 39, in <module>
tactic_1 | from .js_wrapper import *
tactic_1 | File "/opt/tactic/tactic/src/pyasm/common/js_wrapper.py", line 21, in <module>
tactic_1 | from tactic_client_lib import TacticServerStub
tactic_1 | ModuleNotFoundError: No module named 'tactic_client_lib'