feat: Add built-in PostgreSQL for simple production setup (#2345)

* feat: Add built-in PostgreSQL for simple production setup

Fixes #2321.

* Use fork of embedded-postgres for cache path
This commit is contained in:
Kyle Carberry
2022-06-15 16:02:18 -05:00
committed by GitHub
parent bb4ecd72c5
commit ccd061652b
23 changed files with 413 additions and 480 deletions
+6 -13
View File
@@ -98,12 +98,8 @@ PATH="$STANDALONE_INSTALL_PREFIX/bin:\$PATH"
EOF
fi
cath <<EOF
Run Coder (temporary):
$STANDALONE_BINARY_NAME server --dev
Or run a production deployment with PostgreSQL:
CODER_PG_CONNECTION_URL="postgres://<username>@<host>/<database>?password=<password>" \\
$STANDALONE_BINARY_NAME server
Run Coder:
$STANDALONE_BINARY_NAME server
EOF
}
@@ -115,15 +111,12 @@ $1 package has been installed.
To run Coder as a system service:
# Configure the PostgreSQL database for Coder
# Set up an external access URL or enable CODER_TUNNEL
sudo vim /etc/coder.d/coder.env
# Have systemd start Coder now and restart on boot
# Use systemd to start Coder now and on reboot
sudo systemctl enable --now coder
Or, run a temporary deployment (all data is in-memory
and destroyed on exit):
coder server --dev
# View the logs to ensure a successful start
journalctl -u coder.service -b
EOF
}