Closed
Description
We should add an example to the docs for setting up an external PostgreSQL database.
It doesn't have to be very comprehensive, but it's good to illustrate how a user can go about doing it.
I'm not saying these are the instructions we should use, but something along the lines:
# Install and start the database server.
sudo apt update
sudo apt install postgresql
sudo systemctl enable postgresql
sudo systemctl start postgresql
# Create a role and empty database for coder to use.
# NOTE: Use a strong password instead of "secret42".
# NOTE: Consider using a more limited user than superuser.
sudo -u postgres psql \
-c "create role coder login superuser password 'secret42';" \
-c "create database coder;"
# Start the coder server.
export CODER_PG_CONNECTION_URL="postgres://coder@localhost/coder?password=secret42"
coder server