Files
zkopru/docker-compose.instant-block.yml
Wanseob Lim c5f15ecc45 refactor: improve build & test process
1. Describe build context & dockerfiles in `dockerfiles/docker-compose.yml`.
2. Using utils.buildAndGetContainer() function, specify the service name
and build the image before run test.
3. To skip the initial build process, developer can run `yarn pull:images`
on the root directory.
2020-08-17 13:31:47 +09:00

57 lines
1.6 KiB
YAML

version: "3"
services:
testnet:
ports:
- "5000:5000"
build:
context: ./packages/contracts/
dockerfile: ../../dockerfiles/Contract.dockerfile
command: ganache-cli --db=/data -i 20200406 -p 5000 --deterministic --host 0.0.0.0 --secure
postgres:
ports:
- "5678:5432"
build:
context: ./
dockerfile: ./dockerfiles/Postgres.dockerfile
environment:
POSTGRES_PASSWORD: helloworld
postgres-setup:
build:
context: ./
dockerfile: ./dockerfiles/PostgresSetup.dockerfile
depends_on:
- 'postgres'
links:
- 'postgres:postgres'
environment:
POSTGRES_URL: postgresql://postgres:helloworld@postgres:5432/zkopru
command: prisma migrate up --experimental --schema /proj/prisma/postgres-migrator.prisma --verbose
coordinator:
build:
context: ./
dockerfile: ./dockerfiles/Cli.dockerfile
ports:
- "1234:1234"
- "8888:8888"
links:
- 'testnet:testnet'
- 'postgres:postgres'
depends_on:
- 'testnet'
- 'postgres-setup'
command: sh -c "sleep 5s && gotty -w --port 1234 node /proj/packages/cli/dist/apps/coordinator/cli.js --config /proj/packages/cli/coordinator.dev.json"
wallet:
build:
context: ./
dockerfile: ./dockerfiles/Cli.dockerfile
ports:
- "4321:4321"
links:
- 'testnet:testnet'
- 'postgres:postgres'
- 'coordinator:coordinator'
depends_on:
- 'testnet'
- 'postgres-setup'
command: sh -c "sleep 5s && gotty -w --port 4321 node /proj/packages/cli/dist/apps/wallet/cli.js --config /proj/packages/cli/wallet.dev.json"