Skip to content

Commit 72944d1

Browse files
committed
build fix
1 parent 0674625 commit 72944d1

File tree

4 files changed

+55
-9
lines changed

4 files changed

+55
-9
lines changed

Dockerfile

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
FROM node:8-alpine
1+
FROM node:10-alpine
22

33
WORKDIR /usr/src/judge-api
4+
RUN apk add --no-cache yarn
45

56
COPY package.json .
6-
RUN npm install -D
7+
RUN yarn
78

89
COPY . .
910

10-
RUN npm run build
11+
RUN yarn build
1112

1213
EXPOSE 3737
1314

package-lock.json

+49
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/build_docker.sh

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
#!/usr/bin/env bash
2-
3-
VERSION=$(node -p -e "require('./package.json').version")
4-
52
npm install -D
63
npm run build
74

8-
docker build -t codingblocks/judge-api:$VERSION -t codingblocks/judge-api .
5+
docker build -t codingblocks/judge-api .
96
docker system prune -f
107

118
read -p "Push to Docker? [Press Enter to continue]"
12-
docker push codingblocks/judge-api:$VERSION
139
docker push codingblocks/judge-api

src/utils/s3.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@ export const download = async function (url: string, enc: string = 'base64') : P
4545
if (!url) return ''
4646

4747
const {data} = await axios.get(url)
48-
return Buffer.from(data).toString(enc)
48+
return Buffer.from(data).toString(<any>enc)
4949
}

0 commit comments

Comments
 (0)