Skip to content

Commit bfa6bd1

Browse files
committed
Restore files
1 parent 5b5195e commit bfa6bd1

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

101-lab/Caddyfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
:2015
2+
# Turn on the Web/file server
3+
file_server
4+
# The site root
5+
root * /opt/app-root
6+
# Because we should
7+
encode zstd gzip
8+
header / {
9+
# prevent any static html from being cached
10+
Cache-Control "public, max-age=0, must-revalidate"
11+
}
12+
# slurp up the logs for human consumption.
13+
log {
14+
#errors stdout
15+
output stdout
16+
format single_field common_log
17+
level info
18+
}

101-lab/Dockerfile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
FROM arctiqteam/gitbook-base:3.2.3
2+
# Set paths, permissions, and add content
3+
ENV APP_ROOT=/opt/app-root
4+
ENV PATH=${APP_ROOT}/bin:${PATH} HOME=${APP_ROOT}
5+
# where caddyfile is mounted
6+
RUN mkdir ${APP_ROOT}/config
7+
RUN mkdir ${APP_ROOT}/content
8+
COPY content/ ${APP_ROOT}/content
9+
COPY Caddyfile ${APP_ROOT}/config
10+
RUN echo "Installing Caddy V2 (Beta), this is based of a github release and should be checked periodically to ensure the latest version is being used"
11+
RUN chmod -R u+x ${APP_ROOT}/bin && \
12+
chgrp -R 0 ${APP_ROOT} && \
13+
chmod -R g=u ${APP_ROOT} /etc/passwd && \
14+
mkdir /usr/local/bin/caddy2 && \
15+
curl -sSL -o caddy_2.4.0-beta.1_linux_amd64.tar.gz -f https://github.com/caddyserver/caddy/releases/download/v2.4.0-beta.1/caddy_2.4.0-beta.1_linux_amd64.tar.gz && \
16+
tar -xzvf caddy_2.4.0-beta.1_linux_amd64.tar.gz -C /usr/local/bin/ && \
17+
chmod +x /usr/local/bin/caddy && rm caddy_2.4.0-beta.1_linux_amd64.tar.gz
18+
# build md into html pages
19+
RUN cd ${APP_ROOT}/content && \
20+
chgrp -R 0 ${APP_ROOT}/content && \
21+
chmod -R g=u ${APP_ROOT}/content && \
22+
gitbook install && \
23+
gitbook build && \
24+
# mv ${APP_ROOT}/_book ${APP_ROOT} && \
25+
chgrp -R 0 ${APP_ROOT} && \
26+
chmod -R g+w ${APP_ROOT} && \
27+
chgrp -R 0 ${APP_ROOT} && \
28+
chmod -R g=u ${APP_ROOT}
29+
RUN mv ${APP_ROOT}/content/_book/* ${APP_ROOT}
30+
WORKDIR ${APP_ROOT}
31+
EXPOSE 2015
32+
CMD ["sh", "-c", "/usr/local/bin/caddy run --config ${APP_ROOT}/config/Caddyfile" ]
33+
# TODO FIGUIRE OUT HOW TO BUILD OCP101 and 201 labs independantly!

0 commit comments

Comments
 (0)