File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ .git /
2+ public /
3+ resources /
Original file line number Diff line number Diff line change 1+ node_modules /
2+ package.json
3+
4+ # Hugo generated files
5+ public /
6+ resources /
7+ themes /
8+ hugo_stats.json
9+ .hugo_build.lock
10+ go.sum
11+
12+ # HugoPlat exampleSite
13+ assets /
14+ config /
15+ content /
16+ data /
17+ i18n /
18+ go.mod
19+ hugo.toml
Original file line number Diff line number Diff line change 1+ FROM hugomods/hugo:latest AS site
2+ WORKDIR /site/
3+ RUN git clone https://github.com/zeon-studio/hugoplate.git themes/hugoplate
4+ RUN cp themes/hugoplate/package.json . && npm install
5+ RUN cp -R themes/hugoplate/exampleSite/* .
6+ RUN sed -i 's/https:\/\/ example.org/http:\/\/ localhost/g' hugo.toml
7+ # COPY . .
8+ RUN hugo
9+
10+ FROM nginx:alpine AS nginx
11+ WORKDIR /usr/share/nginx/html
12+ COPY --from=site /site/public/ .
13+ COPY --from=site /site/resources/_gen/ .
14+ EXPOSE 80
Original file line number Diff line number Diff line change 1+ DOCKER_IMAGE ='computingteachers'
2+
3+ .PHONEY : hugo
4+ hugo : hugo.toml node_modules
5+ hugo
6+ hugo.toml : themes/hugoplate
7+ cp -R themes/hugoplate/exampleSite/* .
8+ node_modules : package.json
9+ npm install
10+ package.json : themes/hugoplate
11+ cp themes/hugoplate/package.json .
12+ themes/hugoplate :
13+ git clone --recurse-submodules https://github.com/zeon-studio/hugoplate.git themes/hugoplate
14+
15+
16+ public : clean
17+ docker build --tag ${DOCKER_IMAGE} --target site .
18+
19+ docker create --name=${DOCKER_IMAGE} ${DOCKER_IMAGE}
20+ docker cp ${DOCKER_IMAGE}:/site/public/ public/
21+ docker rm ${DOCKER_IMAGE}
22+
23+ .PHONEY : serve_nginx
24+ serve_nginx :
25+ docker build --tag ${DOCKER_IMAGE} nginx .
26+ docker run --rm --publish 80:80 ${DOCKER_IMAGE} nginx
27+
28+ clean :
29+ docker image rm --force ${DOCKER_IMAGE} ${DOCKER_IMAGE} nginx
30+ rm -rf \
31+ public \
32+ resources \
33+ go.* \
34+ hugo_stats.json \
35+ assets \
36+ .hugo_* \
37+ hugo.toml \
38+ config \
39+ content \
40+ data \
41+ i18n \
42+ package.json \
43+ package-lock.json \
44+
45+ clean_all : clean
46+ rm -rf \
47+ themes \
48+ node_modules \
You can’t perform that action at this time.
0 commit comments