Merge pull request #37 from zkokk/REF-1

Adding entrypoint.sh
This commit is contained in:
zkokk 2024-06-15 21:22:33 +03:00 committed by GitHub
commit e68750c80a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 6 deletions

View file

@ -46,13 +46,8 @@ jobs:
# npm install --save-dev @nomicfoundation/hardhat-toolbox
# 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
uses: docker/build-push-action@v5
with:

View file

@ -12,4 +12,10 @@ COPY . .
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