openthc / docker

8 stars 1 forks source link

App container fails to start #2

Closed cod-y closed 1 year ago

cod-y commented 2 years ago

Hello,

The default install instructions might be missing some important info. I'm trying to launch a Docker instance of OpenTHC with the default docker-compose and the app container exits silently with an exit code of 1.

I overrode the entrypoint from /openthc-app to tail -f /dev/null to get the container to start. Then I reviewed the contents of /openthc-app and found this:

if [ -z "$OPENTHC_MAGIC_KEY" ]
then
        echo "Shit the Bed" 1>2
        exit 1
fi

So it looks like the startup script is looking for an environment variable OPENTHC_MAGIC_KEY, but that's not mentioned in the documentation anywhere. If I add that then I can get the app container to start, but I'm not sure what this is supposed to be or what it's used for.

Now that I've got it running I'm supposed to create a section before doing anything else, and I immediately get this:

Free Plan does not allow data updates

cod-y commented 2 years ago

Also, I think it's silently failing because the startup script needs 1>&2 rather than 1>2 for the output redirection. When I update that, the script at least shows "Shit the Bed" before exiting. Though it's not really a great explanation of what's missing.

blueku commented 1 year ago

Still seems to be an issue, it prevents the container from running and still stuck at exited(1). Unable to exec the first-time.php due to the container failing.

LOG: background worker "logical replication launcher" (PID 55) exited with exit code 1

mashiox commented 1 year ago

Hello!

We have very recently updated the openthc/app and openthc/sql images.

Please update your images, and follow the steps given in INSTALL.md

We also fixed the "Free Plan does not allow data updates" behavior, but it still may exist in other parts of the app. Please open a new issue for this behavior.