@@ -91,32 +91,32 @@ For example:
9191docker run --rm -it -p 7080:7080 -v /var/run/docker.sock:/var/run/docker.sock -v ~/.coder:/var/run/coder -e DEVURL_HOST="*.mycompany.com" codercom/coder:1.27.0
9292```
9393
94- ## External PostgreSQL database
94+ ## Use an external PostgreSQL database
9595
9696If you'd like to use an external database, you must:
9797
98- 1 . Disable the embedded database with the environment variable ` DB_EMBEDDED `
99- 1 . pass in the database connection information to the external PostgreSQL
100- database:
101-
102- ``` bash
103- docker run --rm -it -p 7080:7080 \
104- -v /var/run/docker.sock:/var/run/docker.sock \
105- -v ~ /.coder:/var/run/coder \
106- # Disable using the embedded DB
107- -e DB_EMBEDDED=" " \
108- # Change these values to match those for your database
109- -e DB_HOST=127.0.0.1 \
110- -e DB_PORT=5432 \
111- -e DB_USER=postgres \
112- -e DB_PASSWORD=" " \
113- -e DB_NAME=postgres \
114- -e DB_SSL_MODE=disable \
115- codercom/coder:1.27.0
116- ```
98+ 1 . Disable the embedded database by setting the ` DB_EMBEDDED ` environment
99+ variable (see the next code snippet for an example)
100+ 1 . Provide the connection information to the external PostgreSQL database:
101+
102+ ``` console
103+ docker run --rm -it -p 7080:7080 \
104+ -v /var/run/docker.sock:/var/run/docker.sock \
105+ -v ~/.coder:/var/run/coder \
106+ # Disable using the embedded DB
107+ -e DB_EMBEDDED="" \
108+ # Change these values to match those for your database
109+ -e DB_HOST=127.0.0.1 \
110+ -e DB_PORT=5432 \
111+ -e DB_USER=postgres \
112+ -e DB_PASSWORD="" \
113+ -e DB_NAME=postgres \
114+ -e DB_SSL_MODE=disable \
115+ codercom/coder:1.27.0
116+ ```
117117
118118Coder supports client TLS certificates using ` DB_SSL_MODE=verify-full ` . Ensure
119- that you mount the certs into the container (add the flag
119+ that you mount the certs into the container (and add the flag
120120` -v <local_certs>:/certs ` ). Then, specify the certificate path using environment
121121variables:
122122
0 commit comments