Ghostwriter CLI Reports an Issue with PostgreSQL
You may encounter an issue with PostgreSQL while upgrading an existing installation. Ghostwriter v2.x.x and lower used environment variables stored in files under .envs/.production/.postgres. Beginning with v3.0.0, Ghostwriter no longer uses the .envs/ files and you must transfer your PostgreSQL username and password to the new configuration file. By default, Ghostwriter CLI generates a random password for a defaultpostgres user. Update the configuration with your Postgres credentials by running these commands:
psql tool. First, start the containers even if initialization fails due to the bad password.
\password command to set a new password for the postgres user:
If
postgres is not your username, change the command to use your chosen username. If you are not sure what the username is, run the \du command:\q quits the psql console. Set your new password in Ghostwriter’s config, and then bring the containers down and back up.
Stuck Waiting for Django to Start / 502 Bad gateway
There will be times something goes wrong during the Docker build. One of the most common issues is filesystem permissions are not being set correctly. Ghostwriter runs under thedjango user, not root. The django user should own all files under the /app directory.
If you are stuck waiting for Django to start, run this command and check file permission errors: ./ghostwriter-cli logs django
If you see file permission errors, check the user and group permissions for some of the affected files like so:
chown command that Docker is supposed to run during the build. It must be run as root. Use Docker Compose’s run command like the above examples but add -u root:
ls -la command shows the proper permissions, and then try restarting the Ghostwriter services: