I realize I'm on the bleeding edge of current development in the repo,
but I have been trying to get my app working using docker-compose and
a Dockerfile that inherits from the tethys-core image. The new
development branch docs on this gave me a good start, but I haven't
quite been able to figure out how to really make an app work. What
might be really helpful is a working example case.
After running into problems with getting my own app working this way,
I decided to take a step back and try to get the dams_inventory app
from the tutorial working, with the thought that it might be a start
on a useful example for the docs. Luckily, I'm running into exactly
the same errors in the dams example as in my own app, suggesting I'm
probably making the same mistake.
Specifically, I'm having trouble bringing up the database for the app
(using syncstores). When I try to do this in the salt script, I get an
error that the django module isn't known. When I run a bash session on
the container and try running tethys syncstores there, I get an error
that says this:
FATAL: database "tethys_default" does not exist
The output from docker-compose also has some errors early on, which
seem to relate to the tethys db. I'm guessing that somehow it hasn't
been initialized correctly. A clip from that error message is below.
I put my code into a fork of the dams tutorial (advanced-solution). It's here:
https://github.com/speleophysics/tethysapp-dam_inventory/tree/docker-example
Any suggestions on where I might be going wrong?
Thanks,
Matt
--------------------------
dams-docker | db:5432 - accepting connections
dams-docker | tput: No value for $TERM and no -T specified
dams-docker | tput: No value for $TERM and no -T specified
dams-docker | - Enforcing start state... (This might take a bit)
dams-docker | tput: No value for $TERM and no -T specified
dams-docker | [WARNING ]
/usr/lib/python3/dist-packages/salt/states/file.py:278:
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will
stop working
dams-docker | from collections import Iterable, Mapping, defaultdict
dams-docker |
db_1 | 2020-06-29 18:40:32.538 UTC [95] ERROR: relation
"tethys_apps_tethysapp" does not exist at character 483
db_1 | 2020-06-29 18:40:32.538 UTC [95] STATEMENT: SELECT
"tethys_apps_tethysapp"."id", "tethys_apps_tethysapp"."package",
"tethys_apps_tethysapp"."name", "tethys_apps_tethysapp"."description",
"tethys_apps_tethysapp"."enable_feedback",
"tethys_apps_tethysapp"."feedback_emails",
"tethys_apps_tethysapp"."tags", "tethys_apps_tethysapp"."index",
"tethys_apps_tethysapp"."icon", "tethys_apps_tethysapp"."root_url",
"tethys_apps_tethysapp"."color", "tethys_apps_tethysapp"."enabled",
"tethys_apps_tethysapp"."show_in_apps_library" FROM
"tethys_apps_tethysapp"
db_1 | 2020-06-29 18:40:32.551 UTC [95] ERROR: relation
"tethys_apps_tethysapp" does not exist at character 483
db_1 | 2020-06-29 18:40:32.551 UTC [95] STATEMENT: SELECT
"tethys_apps_tethysapp"."id", "tethys_apps_tethysapp"."package",
"tethys_apps_tethysapp"."name", "tethys_apps_tethysapp"."description",
"tethys_apps_tethysapp"."enable_feedback",
"tethys_apps_tethysapp"."feedback_emails",
"tethys_apps_tethysapp"."tags", "tethys_apps_tethysapp"."index",
"tethys_apps_tethysapp"."icon", "tethys_apps_tethysapp"."root_url",
"tethys_apps_tethysapp"."color", "tethys_apps_tethysapp"."enabled",
"tethys_apps_tethysapp"."show_in_apps_library" FROM
"tethys_apps_tethysapp" WHERE "tethys_apps_tethysapp"."package" =
'dam_inventory'
db_1 | 2020-06-29 18:40:32.580 UTC [95] ERROR: relation
"django_content_type" does not exist at character 106
db_1 | 2020-06-29 18:40:32.580 UTC [95] STATEMENT: SELECT
"django_content_type"."id", "django_content_type"."app_label",
"django_content_type"."model" FROM "django_content_type" WHERE
("django_content_type"."app_label" = 'tethys_apps' AND
"django_content_type"."model" = 'tethysapp')
db_1 | 2020-06-29 18:40:32.583 UTC [95] ERROR: relation
"tethys_quotas_resourcequota" does not exist at character 24
db_1 | 2020-06-29 18:40:32.583 UTC [95] STATEMENT: SELECT (1) AS
"a" FROM "tethys_quotas_resourcequota" WHERE
"tethys_quotas_resourcequota"."codename" = 'user_workspace_quota'
LIMIT 1
-------------------------
Matt Covington
Associate Professor
Department of Geosciences
340 N. Campus Dr.
216 Gearhart Hall
University of Arkansas
Fayetteville, AR 72701
webpage -
http://www.speleophysics.com/
-------------------------