Skip to content

Commit

Permalink
Add Paris docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
dmirgaleev authored and Groxan committed May 31, 2024
1 parent b16ca5b commit 5338801
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 64 deletions.
42 changes: 21 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ init:
docker-compose exec -T db createdb -U tzkt -T template0 tzkt_db
docker-compose exec -T db apt update
docker-compose exec -T db apt install -y wget
docker-compose exec -T db wget "https://snapshots.tzkt.io/tzkt_v1.13_mainnet.backup" -O tzkt_db.backup
docker-compose exec -T db wget "https://snapshots.tzkt.io/tzkt_v1.14_mainnet.backup" -O tzkt_db.backup
docker-compose exec -T db pg_restore -U tzkt -O -x -v -d tzkt_db -e -j 4 tzkt_db.backup
docker-compose exec -T db rm tzkt_db.backup
docker-compose exec -T db apt autoremove --purge -y wget
Expand Down Expand Up @@ -52,7 +52,7 @@ ghost-init:
docker-compose -f docker-compose.ghost.yml exec -T ghost-db createdb -U tzkt -T template0 tzkt_db
docker-compose -f docker-compose.ghost.yml exec -T ghost-db apt update
docker-compose -f docker-compose.ghost.yml exec -T ghost-db apt install -y wget
docker-compose -f docker-compose.ghost.yml exec -T ghost-db wget "https://snapshots.tzkt.io/tzkt_v1.13_ghostnet.backup" -O tzkt_db.backup
docker-compose -f docker-compose.ghost.yml exec -T ghost-db wget "https://snapshots.tzkt.io/tzkt_v1.14_ghostnet.backup" -O tzkt_db.backup
docker-compose -f docker-compose.ghost.yml exec -T ghost-db pg_restore -U tzkt -O -x -v -d tzkt_db -e -j 4 tzkt_db.backup
docker-compose -f docker-compose.ghost.yml exec -T ghost-db rm tzkt_db.backup
docker-compose -f docker-compose.ghost.yml exec -T ghost-db apt autoremove --purge -y wget
Expand All @@ -67,27 +67,27 @@ ghost-stop:
ghost-db-start:
docker-compose -f docker-compose.ghost.yml up -d ghost-db

oxford-init:
docker-compose -f docker-compose.oxford.yml up -d oxford-db
docker-compose -f docker-compose.oxford.yml exec -T oxford-db psql -U tzkt postgres -c '\l'
docker-compose -f docker-compose.oxford.yml exec -T oxford-db dropdb -U tzkt --if-exists tzkt_db
docker-compose -f docker-compose.oxford.yml exec -T oxford-db createdb -U tzkt -T template0 tzkt_db
docker-compose -f docker-compose.oxford.yml exec -T oxford-db apt update
docker-compose -f docker-compose.oxford.yml exec -T oxford-db apt install -y wget
docker-compose -f docker-compose.oxford.yml exec -T oxford-db wget "https://snapshots.tzkt.io/tzkt_v1.13_oxfordnet.backup" -O tzkt_db.backup
docker-compose -f docker-compose.oxford.yml exec -T oxford-db pg_restore -U tzkt -O -x -v -d tzkt_db -e -j 4 tzkt_db.backup
docker-compose -f docker-compose.oxford.yml exec -T oxford-db rm tzkt_db.backup
docker-compose -f docker-compose.oxford.yml exec -T oxford-db apt autoremove --purge -y wget
paris-init:
docker-compose -f docker-compose.paris.yml up -d paris-db
docker-compose -f docker-compose.paris.yml exec -T paris-db psql -U tzkt postgres -c '\l'
docker-compose -f docker-compose.paris.yml exec -T paris-db dropdb -U tzkt --if-exists tzkt_db
docker-compose -f docker-compose.paris.yml exec -T paris-db createdb -U tzkt -T template0 tzkt_db
docker-compose -f docker-compose.paris.yml exec -T paris-db apt update
docker-compose -f docker-compose.paris.yml exec -T paris-db apt install -y wget
docker-compose -f docker-compose.paris.yml exec -T paris-db wget "https://snapshots.tzkt.io/tzkt_v1.14_parisnet.backup" -O tzkt_db.backup
docker-compose -f docker-compose.paris.yml exec -T paris-db pg_restore -U tzkt -O -x -v -d tzkt_db -e -j 4 tzkt_db.backup
docker-compose -f docker-compose.paris.yml exec -T paris-db rm tzkt_db.backup
docker-compose -f docker-compose.paris.yml exec -T paris-db apt autoremove --purge -y wget
docker-compose pull

oxford-start:
docker-compose -f docker-compose.oxford.yml up -d
paris-start:
docker-compose -f docker-compose.paris.yml up -d

oxford-stop:
docker-compose -f docker-compose.oxford.yml down
paris-stop:
docker-compose -f docker-compose.paris.yml down

oxford-db-start:
docker-compose -f docker-compose.oxford.yml up -d oxford-db
paris-db-start:
docker-compose -f docker-compose.paris.yml up -d paris-db
reset:
docker-compose -f docker-compose.oxford.yml down --volumes
docker-compose -f docker-compose.oxford.yml up -d oxford-db
docker-compose -f docker-compose.paris.yml down --volumes
docker-compose -f docker-compose.paris.yml up -d paris-db
43 changes: 0 additions & 43 deletions docker-compose.oxford.yml

This file was deleted.

43 changes: 43 additions & 0 deletions docker-compose.paris.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
version: '3'

services:
paris-db:
container_name: paris-db
restart: always
image: postgres:16
environment:
POSTGRES_USER: ${POSTGRES_USER:-tzkt}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-qwerty}
POSTGRES_DB: ${POSTGRES_DB:-tzkt_db}
volumes:
- paris-postgres:/var/lib/postgresql/data
ports:
- 127.0.0.1:5435:5432

paris-api:
container_name: paris-api
restart: always
image: bakingbad/tzkt-api:latest
depends_on:
- paris-db
environment:
ConnectionStrings__DefaultConnection: host=paris-db;port=5432;database=${POSTGRES_DB:-tzkt_db};username=${POSTGRES_USER:-tzkt};password=${POSTGRES_PASSWORD:-qwerty};command timeout=${COMMAND_TIMEOUT:-600};
Kestrel__Endpoints__Http__Url: http://0.0.0.0:5000
ports:
- 0.0.0.0:5030:5000

paris-sync:
container_name: paris-sync
restart: always
image: bakingbad/tzkt-sync:latest
environment:
ConnectionStrings__DefaultConnection: host=paris-db;port=5432;database=${POSTGRES_DB:-tzkt_db};username=${POSTGRES_USER:-tzkt};password=${POSTGRES_PASSWORD:-qwerty};command timeout=${COMMAND_TIMEOUT:-600};
Kestrel__Endpoints__Http__Url: http://0.0.0.0:5001
TezosNode__Endpoint: https://rpc.tzkt.io/parisnet/
depends_on:
- paris-db
ports:
- 0.0.0.0:5031:5001

volumes:
paris-postgres:

0 comments on commit 5338801

Please sign in to comment.