-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* made a docker image * ignore yarn * get rid of .yarn from commit * lock changed * docker compose * azure devops ci Co-authored-by: Thomas McDonald <[email protected]>
- Loading branch information
1 parent
f6c04d4
commit 125c88b
Showing
7 changed files
with
98 additions
and
10 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 @@ | ||
.yarn | ||
node_modules | ||
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
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 @@ | ||
nodeLinker: node-modules |
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 |
---|---|---|
@@ -1,13 +1,24 @@ | ||
FROM node:buster as BUILDER | ||
|
||
FROM node:18 | ||
WORKDIR /app | ||
COPY . . | ||
RUN apt update && apt install -y git | ||
RUN yarn install && yarn build | ||
# RUN mkdir /root/.ssh | ||
# ADD ./.ssh/ /root/.ssh | ||
# RUN chown node:node /app package.json yarn.lock | ||
# USER node | ||
# RUN useradd nodeUser | ||
# RUN su - nodeUser | ||
# RUN mkdir ~/.ssh/ | ||
# RUN cd ~/.ssh && ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa | ||
|
||
RUN npm install yarn --legacy-peer-deps | ||
|
||
# -------------------------------------------------- | ||
FROM nginx | ||
# RUN touch ~/.ssh/known_hosts | ||
# RUN ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts | ||
# RUN eval $(ssh-agent) | ||
|
||
COPY --from=BUILDER /app/build /usr/share/nginx/html | ||
RUN git config --global url."https://github.com/".insteadOf [email protected]: | ||
RUN git config --global url."https://".insteadOf ssh://git | ||
|
||
EXPOSE 80 | ||
RUN yarn install | ||
CMD ["yarn", "dev"] | ||
EXPOSE 5173 |
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,41 @@ | ||
trigger: | ||
batch: true | ||
branches: | ||
include: | ||
- main | ||
- dev | ||
- release/* | ||
- feature/* | ||
- project/* | ||
|
||
pr: | ||
- master | ||
- dev | ||
|
||
pool: | ||
vmImage: ubuntu-latest | ||
|
||
jobs: | ||
- job: 'BuildAndPush' | ||
steps: | ||
- pwsh: | | ||
$branchtag="" | ||
echo "$(Build.SourceBranch)" | ||
if ("$(Build.SourceBranch)" -match ".*release/.*"){ | ||
$branchtag=$( "$(Build.SourceBranch)" -replace "refs/heads/", "") | ||
$branchtag=$( $branchtag -replace "/", "--") | ||
} | ||
echo "branchtag: $branchtag" | ||
echo "##vso[task.setvariable variable=releaseTag;]$branchtag" | ||
- task: Docker@2 | ||
displayName: 'Build Docker Image' | ||
inputs: | ||
containerRegistry: 'substrate-relayer' | ||
repository: 'gluwa/staking-dashboard' | ||
command: 'buildAndPush' | ||
Dockerfile: '**/Dockerfile' | ||
tags: | | ||
$(Build.BuildId) | ||
latest | ||
$(releaseTag) |
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,31 @@ | ||
# Use root/example as user/password credentials | ||
version: '3.1' | ||
|
||
services: | ||
|
||
dashboard: | ||
build: . | ||
restart: always | ||
ports: | ||
- 5173:5173 | ||
|
||
miner: | ||
image: gluwa/creditcoin:latest | ||
ports: | ||
- ${PORT}:${PORT} | ||
- ${RPC_PORT}:${RPC_PORT} | ||
volumes: | ||
- /Users/notaturkey/dev/miner/data:/data | ||
command: | ||
--validator | ||
--name creditcoin-miner | ||
--prometheus-external | ||
--telemetry-url "wss://telemetry.polkadot.io/submit/ 0" | ||
--bootnodes "/dns4/bootnode.creditcoin.network/tcp/30333/p2p/12D3KooWAEgDL126EUFxFfdQKiUhmx3BJPdszQHu9PsYsLCuavhb" "/dns4/bootnode2.creditcoin.network/tcp/30333/p2p/12D3KooWSQye3uN3bZQRRC4oZbpiAZXkP2o5UZh6S8pqyh24bF3k" "/dns4/bootnode3.creditcoin.network/tcp/30333/p2p/12D3KooWFrsEZ2aSfiigAxs6ir2kU6en4BewotyCXPhrJ7T1AzjN" | ||
--public-addr "/dns4/${IP_ADDRESS}/tcp/${PORT}" | ||
--chain mainnet | ||
--mining-key ${KEY} | ||
--base-path /data | ||
--port ${PORT} | ||
--unsafe-rpc-external | ||
--rpc-port ${RPC_PORT} |
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