-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dockerize and add mountable config file
- Loading branch information
1 parent
b09a87e
commit 0e5e9f2
Showing
6 changed files
with
108 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
.next | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Build and publish image | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- feature* | ||
- fix* | ||
tags: | ||
- '*' | ||
workflow_dispatch: #allow manual trigger to workflow | ||
|
||
jobs: | ||
build_and_push_image: | ||
name: build and push image to registry | ||
runs-on: ubuntu-latest | ||
# environment: DockerHub | ||
defaults: | ||
run: | ||
working-directory: deployment-generator | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Docker login | ||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
run: | | ||
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | ||
- name: Determine Docker Image Name | ||
id: image | ||
run: | | ||
if [[ "${{github.ref_name}}" == "master" ]]; then | ||
echo "name=xinfinorg/subswap-frontend:latest" >> $GITHUB_OUTPUT | ||
else | ||
echo "name=xinfinorg/subswap-frontend:${{github.ref_name}}" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Build and push image | ||
run: | | ||
docker build . --file docker/Dockerfile \ | ||
--build-arg SUBNET_BRANCH=${{ steps.commit.outputs.commit}} \ | ||
--build-arg IMAGE_NAME=${{ steps.image.outputs.name }} \ | ||
--tag ${{ steps.image.outputs.name }} | ||
docker push ${{ steps.image.outputs.name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM node:20 | ||
|
||
WORKDIR /app | ||
|
||
COPY . /app | ||
|
||
RUN yarn | ||
|
||
ENTRYPOINT ["/bin/sh", "-c" , "yarn build && yarn start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"parentnetUrl":"https://erpc.apothem.network/", | ||
"parentnetChainId":"51", | ||
"subnetUrl":"http://localhost:8545", | ||
"subnetChainId":"999", | ||
"subnetApp": "0x9777050a8402ac5958aA87631B15e98e26610EB5", | ||
"parentnetApp": "0xC355520747171Bd75f505E8cd12f935944bD783b", | ||
"tokens" : [ | ||
{ | ||
"name": "Token A", | ||
"address": "0x103BAA273da5C2FEF2d1B8f839044A9bd07Bc1A1" | ||
} | ||
] | ||
} |