Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add local dev docker setup #1975

Merged
merged 9 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -175,5 +175,8 @@ fabric.properties

# End of https://www.gitignore.io/api/intellij

.idea
.netlify
.env
dump-*
tmp
73 changes: 73 additions & 0 deletions docker-compose.yml
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
Loading