mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
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:
+5
-5
@@ -12,10 +12,6 @@ echo '== Without these binaries, workspaces will fail to start!'
|
||||
# Run yarn install, to make sure node_modules are ready to go
|
||||
"$PROJECT_ROOT/scripts/yarn_install.sh"
|
||||
|
||||
# Use static credentials for development
|
||||
export CODER_DEV_ADMIN_EMAIL=admin@coder.com
|
||||
export CODER_DEV_ADMIN_PASSWORD=password
|
||||
|
||||
# This is a way to run multiple processes in parallel, and have Ctrl-C work correctly
|
||||
# to kill both at the same time. For more details, see:
|
||||
# https://stackoverflow.com/questions/3004811/how-do-you-run-multiple-programs-in-parallel-from-a-bash-script
|
||||
@@ -24,10 +20,14 @@ export CODER_DEV_ADMIN_PASSWORD=password
|
||||
|
||||
trap 'kill 0' SIGINT
|
||||
CODERV2_HOST=http://127.0.0.1:3000 INSPECT_XSTATE=true yarn --cwd=./site dev &
|
||||
go run -tags embed cmd/coder/main.go server --dev --tunnel=true &
|
||||
go run -tags embed cmd/coder/main.go server --in-memory --tunnel &
|
||||
|
||||
# Just a minor sleep to ensure the first user was created to make the member.
|
||||
sleep 2
|
||||
|
||||
# create the first user, the admin
|
||||
go run cmd/coder/main.go login http://127.0.0.1:3000 --username=admin --email=admin@coder.com --password=password || true
|
||||
|
||||
# || yes to always exit code 0. If this fails, whelp.
|
||||
go run cmd/coder/main.go users create --email=member@coder.com --username=member --password="${CODER_DEV_ADMIN_PASSWORD}" || true
|
||||
wait
|
||||
|
||||
Reference in New Issue
Block a user