Skip to main content

Starting the dapp

About docker files 🐳

In this project, we have three Docker Compose main files with one common service.

  • docker-compose-dev.yml / Development mode: This file is used to run in development mode, operating the scaffold-eth2 Next.js server to interact with the testnet contracts, local off-chain server, and the DApp frontend. It is necessary to set the environment variables in the .env file, instructions can be found in the Environment Variables section.
  • docker-compose-deploy.yml / Deploy mode: This file is used to deploy the contracts to the testnet and run a local off-chain server and the DApp frontend. It is necessary to set the environment variables in the .env file, instructions can be found in the Environment Variables section.
  • docker-compose-test.yml / Test mode: This file is used to run the tests of the off-chain and the contracts in a local environment.

Starting the dapp ⚙️

Now with all the prerequisites installed and the project cloned, you can start the Docker containers to run the DApp. You can do this by running the following command in the terminal, depending on the environment you wish to run the DApp:

docker compose -f docker-compose-dev.yml up

The DApp will be available at http://localhost:3333. If you are running the DApp in development mode, you can access the scaffold-eth2 Next.js server at http://localhost:3000 to debug the contracts.