-
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.
- Loading branch information
Showing
7 changed files
with
80 additions
and
0 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,2 @@ | ||
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM ubuntu:focal | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y curl wget | ||
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - | ||
RUN apt-get upgrade -y | ||
RUN apt-get install -y nodejs | ||
|
||
WORKDIR /home/app | ||
|
||
RUN wget https://dist.ipfs.tech/kubo/v0.26.0/kubo_v0.26.0_linux-amd64.tar.gz | ||
RUN tar -xvzf kubo_v0.26.0_linux-amd64.tar.gz | ||
RUN cd kubo | ||
RUN bash kubo/install.sh | ||
|
||
RUN apt-get install git -y | ||
|
||
COPY main.sh main.sh | ||
COPY index.js index.js | ||
COPY package*.json . | ||
|
||
RUN npm install | ||
|
||
RUN chmod +x main.sh | ||
RUN chmod +x index.js | ||
|
||
|
||
ENTRYPOINT [ "/home/app/main.sh" ] |
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,13 @@ | ||
import fs from 'fs'; | ||
import path from 'path'; | ||
import { exec } from 'child_process'; | ||
|
||
const result = exec('ipfs --version') | ||
result.stdout.on('data', (data) => { | ||
console.log(data); | ||
}); | ||
result.stderr.on('data', (data) => { | ||
console.error(data); | ||
}); | ||
|
||
|
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,7 @@ | ||
#!/bin/bash | ||
|
||
export GIT_REPOSITORY__URL="$GIT_REPOSITORY__URL" | ||
|
||
git clone "$GIT_REPOSITORY__URL" /home/app/output | ||
|
||
exec node index.js |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,12 @@ | ||
{ | ||
"name": "build-server", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"type": "module", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "", | ||
"license": "ISC" | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.