Adding entrypoint.sh

This commit is contained in:
Ruslan Gladov 2024-06-15 21:21:42 +03:00
parent bd2d3a40c0
commit 2b20e4d1c2
3 changed files with 14 additions and 6 deletions

View file

@ -46,13 +46,8 @@ jobs:
# npm install --save-dev @nomicfoundation/hardhat-toolbox # npm install --save-dev @nomicfoundation/hardhat-toolbox
# npx hardhat ignition deploy ./ignition/modules/Lock.js # npx hardhat ignition deploy ./ignition/modules/Lock.js
- name: Run docker container with the Apollo contract
run: docker run -p 127.0.0.1:8551:8545 --rm hardhat-ignition
- name: Hardhat test
run: npx hardhat test
- name: Build and push Docker image - name: Build and push Docker image
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:

View file

@ -12,4 +12,10 @@ COPY . .
EXPOSE 8545 EXPOSE 8545
CMD ["npx", "hardhat", "ignition", "deploy", "/usr/app/ignition/modules/Apollo.js"] COPY entrypoint.sh /usr/app/entrypoint.sh
RUN chmod +x /usr/app/entrypoint.sh
ENTRYPOINT ["/usr/app/entrypoint.sh"]
#CMD ["npx", "hardhat", "ignition", "deploy", "/usr/app/ignition/modules/Apollo.js"]

7
hardhat/entrypoint.sh Normal file
View file

@ -0,0 +1,7 @@
#!/bin/bash
# Deploy the contracts using Hardhat Ignition
npx hardhat ignition deploy /usr/app/ignition/modules/Apollo.js
# Run the tests
npx hardhat test