Skip to content

Add instructions to docs for setting up an external PostgreSQL server with Coder #3508

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mafredri opened this issue Aug 15, 2022 · 6 comments · Fixed by #4901
Closed

Add instructions to docs for setting up an external PostgreSQL server with Coder #3508

mafredri opened this issue Aug 15, 2022 · 6 comments · Fixed by #4901
Assignees
Labels
docs Area: coder.com/docs

Comments

@mafredri
Copy link
Member

mafredri commented Aug 15, 2022

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
@mafredri mafredri added the docs Area: coder.com/docs label Aug 15, 2022
@sharkymark
Copy link
Contributor

@mafredri I did this, and @ammario basically deleted it.

@ammario
Copy link
Member

ammario commented Aug 16, 2022

I removed it because there are already dozens of high-quality tutorials online on how to do this, and the instructions vary based on the cloud and operating system.

@mafredri
Copy link
Member Author

mafredri commented Aug 16, 2022

@ammario I understand your point about PostgreSQL setups, and while I agree in part, I think the value in my suggestion is that a user/admin can get a visual representation of what is needed for Coder to work with my PostgreSQL database. Right now it's a bit of guess work and investigation, digging into e.g. the docker-compose example.

With the snippet above, the goal is for a user to be: aha, I need a user and a DB, and just set the env variable, changing out these parts for my own.

@ammario
Copy link
Member

ammario commented Aug 16, 2022

@mafredri, your reasoning makes sense to me, and I agree with having minimal docs like the one you proposed.

@github-actions
Copy link

This issue is becoming stale. In order to keep the tracker readable and actionable, I'm going close to this issue in 7 days if there isn't more activity.

@github-actions github-actions bot added the stale This issue is like stale bread. label Oct 16, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 23, 2022
@mafredri mafredri removed the stale This issue is like stale bread. label Nov 3, 2022
@mafredri mafredri reopened this Nov 3, 2022
@mtojek mtojek self-assigned this Nov 4, 2022
@mtojek
Copy link
Member

mtojek commented Nov 4, 2022

I'm looking into this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Area: coder.com/docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants