Skip to content

Commit

Permalink
.sh commands to package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
mj52951 committed Jul 16, 2024
1 parent b4c7261 commit 6083e87
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,5 @@ EXPOSE 8000

ARG START_SCRIPT
ENV START_SCRIPT_ENV=$START_SCRIPT
COPY scripts/$START_SCRIPT_ENV /$START_SCRIPT_ENV

ENTRYPOINT sh /$START_SCRIPT_ENV
ENTRYPOINT yarn $START_SCRIPT_ENV
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
context: .
dockerfile: ./Dockerfile
args:
START_SCRIPT: "start-init.sh"
START_SCRIPT: "start:init"
restart: on-failure
depends_on:
- db
Expand All @@ -29,7 +29,7 @@ services:
context: .
dockerfile: ./Dockerfile
args:
START_SCRIPT: "start-sepolia.sh"
START_SCRIPT: "start:sepolia"
restart: on-failure
depends_on:
- indexer-init
Expand All @@ -44,7 +44,7 @@ services:
context: .
dockerfile: ./Dockerfile
args:
START_SCRIPT: "start-holesky.sh"
START_SCRIPT: "start:holesky"
restart: on-failure
depends_on:
- indexer-init
Expand Down
17 changes: 10 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,25 @@
"name": "squid-indexer",
"version": "0.0.0",
"private": true,
"packageManager": "yarn@4.0.1",
"packageManager": "yarn@1.22.19",
"scripts": {
"build": "rm -rf lib && sqd build",
"update": "npx npm-check-updates --filter /subsquid/ --upgrade && npm i -f",
"license-check": "license-check-and-add check -f license-config.json",
"license-add": "license-check-and-add add -f license-config.json",
"license-check": "license-check-and-add check -f license-config.json",
"license-remove": "license-check-and-add remove -f license-config.json",
"migration:generate": "squid-typeorm-migration generate",
"migration:apply": "squid-typeorm-migration apply",
"test:unit": "NODE_ENV=test nyc --exclude **/data/** --all --include \"src/**/*.ts\" mocha -r ts-node/register \"tests/unit/**/*.spec.ts\"",
"lint": "yarn run lint:style && yarn run lint:types",
"lint:fix": "yarn run lint:style --fix && yarn run lint:types",
"lint:style": "eslint --color --ext .ts src/",
"lint:types": "tsc --noEmit --pretty",
"migration:apply": "squid-typeorm-migration apply",
"migration:generate": "squid-typeorm-migration generate",
"start": "docker-compose --env-file ./envs/.env.init up --build",
"stop": "docker-compose --env-file ./envs/.env.init down"
"start:holesky": "node --require=dotenv/config ./lib/main.js dotenv_config_path=envs/.env.holesky",
"start:init": "yarn migration:apply && node --require=dotenv/config ./lib/main_init.js dotenv_config_path=envs/.env.init",
"start:sepolia": "node --require=dotenv/config ./lib/main.js dotenv_config_path=envs/.env.sepolia",
"stop": "docker-compose --env-file ./envs/.env.init down",
"test:unit": "NODE_ENV=test nyc --exclude **/data/** --all --include \"src/**/*.ts\" mocha -r ts-node/register \"tests/unit/**/*.spec.ts\"",
"update": "npx npm-check-updates --filter /subsquid/ --upgrade && npm i -f"
},
"dependencies": {
"@openzeppelin/contracts": "^4.8.3",
Expand Down

0 comments on commit 6083e87

Please sign in to comment.