-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add local dev docker setup (#1975)
* chore: add local dev docker setup * chore: add local dev docker setup * rename regen to ledger * add ledger seed script * fix db restore and ledger seed * add docker setup for indexer * fix server commit and graphiql * replace ledger seed with genesis data
- Loading branch information
1 parent
e411d55
commit 07a0e74
Showing
12 changed files
with
1,516 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -175,5 +175,8 @@ fabric.properties | |
|
||
# End of https://www.gitignore.io/api/intellij | ||
|
||
.idea | ||
.netlify | ||
.env | ||
dump-* | ||
tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
services: | ||
db: | ||
build: | ||
context: . | ||
dockerfile: docker/db.Dockerfile | ||
container_name: db_container | ||
entrypoint: ["/bin/sh", "-c", "./scripts/db_start.sh"] | ||
environment: | ||
POSTGRES_DB: server | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: password | ||
volumes: | ||
- ./docker/scripts/:/scripts/ | ||
network_mode: host | ||
expose: | ||
- 5432 | ||
healthcheck: | ||
test: ["CMD-SHELL", "/scripts/db_healthcheck.sh"] | ||
interval: 1s | ||
timeout: 10s | ||
retries: 100 | ||
|
||
ledger: | ||
build: | ||
context: . | ||
dockerfile: docker/ledger.Dockerfile | ||
container_name: ledger_container | ||
entrypoint: ["/bin/sh", "-c", "./scripts/ledger_start.sh"] | ||
network_mode: host | ||
expose: | ||
- 1317 | ||
- 26657 | ||
healthcheck: | ||
test: ["CMD-SHELL", "curl -f http://127.0.0.1:26657 || exit 1"] | ||
interval: 1s | ||
timeout: 10s | ||
retries: 100 | ||
|
||
server: | ||
build: | ||
context: . | ||
dockerfile: docker/server.Dockerfile | ||
container_name: server_container | ||
environment: | ||
CSRF_SECRET: secret | ||
CSRF_COOKIE_NAME: cookie | ||
DATABASE_URL: postgres://postgres:password@localhost:5432/server | ||
entrypoint: ["/bin/sh", "-c", "./scripts/server_start.sh"] | ||
network_mode: host | ||
expose: | ||
- 5000 | ||
depends_on: | ||
db: | ||
condition: service_healthy | ||
ledger: | ||
condition: service_healthy | ||
|
||
indexer: | ||
build: | ||
context: . | ||
dockerfile: docker/indexer.Dockerfile | ||
container_name: indexer_container | ||
environment: | ||
DATABASE_URL: postgres://postgres:password@localhost:5432/indexer | ||
REGEN_API: http://localhost:1317 | ||
REGEN_RPC: http://localhost:26657 | ||
entrypoint: ["/bin/sh", "-c", "./scripts/indexer_start.sh"] | ||
network_mode: host | ||
depends_on: | ||
db: | ||
condition: service_healthy | ||
ledger: | ||
condition: service_healthy |
Oops, something went wrong.