server: setup with PG in Docker #20
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This describes how to set up DEX server on testnet with Postgres in Docker (managed by docker-compose). Just notes for myself.
Install Decred cli suite: https://docs.decred.org/wallets/cli/cli-installation/
Set up dcrwallet and copy rpc.cert into its cfg dir from dcrd cfg dir: https://docs.decred.org/wallets/cli/dcrwallet-setup/
Then configure legacy account public key: https://github.com/decred/dcrdex/wiki/Server-Installation#generate-a-dcrwallet-account-public-key (won't be using it, just for bypassing some legacy validation)
Set up DEX server configuration files (in
.../Dcrdexcfg dir), use sample config files from this PR to get some working configuration (search bysample-):ethereum.confthat contains a bunch of Providers:markets.json, it will also require paths to dcrd (in.../Dcrdexcfg dir) andethereum.confconfigdcrdex.conf(setpgpass=dexpasshttps://github.com/decred/dcrdex/wiki/Server-Installation#generate-a-dcrwallet-account-public-key)Run Postgres in Docker (it also will create
dcrdexuser anddcrdex_testnetDB):Note, it will run with volume attached and managed by Docker (you can see it via
docker volume ls | grep server_db) to persist server data between Postgres container restarts. Tip: use https://github.com/sosedoff/pgweb for easy access to DB data.Run and sync (might take several hours) dcrd:
Build and run DEX server:
Use printed out URL to connect your
dexcto this server:and
rpc.certfrom.../Dcrdexcfg dir.