-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This avoid adherence with the CI service.
- Loading branch information
1 parent
87aab03
commit 7ac08ef
Showing
5 changed files
with
45 additions
and
7 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,10 @@ | ||
web/node_modules/ | ||
web/build/ | ||
.travis/ | ||
docker/ | ||
scripts/ | ||
*.sh | ||
*.yml | ||
*.md | ||
docs/ | ||
LICENSE |
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 |
---|---|---|
|
@@ -23,3 +23,5 @@ importer-csv | |
|
||
.config.yml | ||
main | ||
|
||
build/ |
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,8 +1,9 @@ | ||
#!/bin/bash | ||
|
||
go test -v ./... | ||
|
||
pushd web && npm ci && npm run build && popd | ||
go build -o go-graphkb cmd/go-graphkb/main.go | ||
go build -o importer-csv cmd/importer-csv/main.go | ||
docker build -t go-graphkb-build . | ||
|
||
cid=`docker create go-graphkb-build` | ||
docker cp $cid:/node/src/go-graphkb . | ||
docker cp $cid:/node/src/importer-csv . | ||
docker cp $cid:/node/src/build web/ | ||
docker rm $cid |
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,25 @@ | ||
FROM golang:1.14-alpine AS go-builder | ||
|
||
WORKDIR /go/src/ | ||
COPY go.mod go.sum ./ | ||
|
||
RUN go mod download | ||
|
||
COPY cmd cmd | ||
COPY graphkb graphkb | ||
COPY internal internal | ||
RUN cd cmd/go-graphkb && GOOS=linux GOARCH=amd64 go build -o go-graphkb main.go | ||
RUN cd cmd/go-graphkb && GOOS=linux GOARCH=amd64 go build -o importer-csv main.go | ||
|
||
|
||
|
||
FROM node:14-alpine AS node-builder | ||
|
||
WORKDIR /node/src/ | ||
|
||
COPY web . | ||
|
||
RUN yarn install && yarn build | ||
|
||
COPY --from=go-builder /go/src/cmd/go-graphkb/go-graphkb ./ | ||
COPY --from=go-builder /go/src/cmd/go-graphkb/importer-csv ./ |
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,9 +1,9 @@ | ||
FROM node:12-alpine | ||
FROM node:14-alpine | ||
|
||
ARG USER_ID | ||
ARG GROUP_ID | ||
|
||
RUN deluser node && \ | ||
addgroup --gid ${GROUP_ID} dev && \ | ||
adduser --uid ${USER_ID} -G dev -D dev | ||
USER dev | ||
USER dev |