Skip to content

Commit 2303618

Browse files
committed
Actually export via Docker
1 parent 244dfd7 commit 2303618

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

Dockerfile

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM node:10-alpine
2+
ARG SCRAPED_DIR
3+
4+
RUN apk update && \
5+
apk add git
6+
7+
RUN git clone https://github.com/gaggle/repo-lister /home/repo-lister && \
8+
chmod -R 0777 /home/repo-lister
9+
WORKDIR /home/repo-lister
10+
RUN npm ci
11+
RUN rm static/repos && \
12+
ln -s $SCRAPED_DIR static/repos
13+
COPY scripts/export-via-docker /home/export-via-docker
14+
15+
ENTRYPOINT ["/home/export-via-docker"]

scripts/export-via-docker

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh -eu
2+
3+
DATA_URL=$1
4+
OUT_FOLDER=$2
5+
echo "Exporting to '${OUT_FOLDER}' w. URL '${DATA_URL}'"
6+
export DATA_URL=${DATA_URL}
7+
npx next build
8+
mkdir -p ${OUT_FOLDER}
9+
npx next export -o ${OUT_FOLDER}

0 commit comments

Comments
 (0)