-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (29 loc) · 1.04 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM haxe:4.2.1-alpine as build
RUN apk add --no-cache curl git git-lfs nodejs npm \
&& npm install --global yarn \
&& yarn global add hexo hexo-cli
COPY . /arbochelli
WORKDIR /arbochelli
RUN git lfs install \
&& git config pull.ff only \
&& git config user.email "[email protected]" \
&& git config user.name "Ghostwriter" \
&& git fetch \
&& git reset --hard origin/master \
&& git submodule update --init --recursive \
&& git submodule foreach git pull origin master \
&& curl 'https://www.youtube.com/feeds/videos.xml?channel_id=UCQyPHw4V7du8Fx-o12_fudw' > static/yt-rss.xml \
&& haxelib install src/build/*.hxml --always \
&& haxe src/build/all.hxml
WORKDIR /arbochelli/blog
RUN yarn \
&& yarn clean \
&& yarn build \
&& git add source/_posts/ \
&& (git commit -m $(ls -1t source/_posts/ | head -1) || true) \
&& git push origin master \
&& rm -rf ../.git/ .git/
FROM caddy:2.5.1-alpine as caddy
COPY --from=build /arbochelli /arbochelli
WORKDIR /arbochelli
CMD ["caddy", "run"]