Last active
April 2, 2021 00:58
-
-
Save nextrevision/12b78ef5ea72ff0e71ab to your computer and use it in GitHub Desktop.
Sempl Workflow with Docker Container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:trusty | |
RUN apt-get update && apt-get -y upgrade | |
RUN apt-get install -y apache2 wget | |
RUN wget -O /usr/local/bin/sempl \ | |
https://raw.githubusercontent.com/nextrevision/sempl/0.2.1/sempl | |
RUN chmod 755 /usr/local/bin/sempl | |
ADD index.html.tmpl /app/index.html.tmpl | |
ADD startup.sh /app/startup.sh | |
EXPOSE 80 | |
CMD ["/bin/bash", "/app/startup.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>App X - $(hostname -f)</title> | |
</head> | |
<body> | |
<div class="content"> | |
<h1>${HEADING:-Hello!}</h1> | |
<p>Welcome to region ${REGION:-us-west-1}</p> | |
</div> | |
### begin | |
# if [ ${DEBUG:-0} -eq 1 ]; then | |
<div class="debugging"> | |
IP addresses: | |
<ul> | |
# for i in $(ip a | awk '/inet /{print $2}' | cut -d'/' -f1); do | |
<li>$i</li> | |
# done | |
</ul> | |
</div> | |
# fi | |
### end | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/local/bin/sempl /app/index.html.tmpl /var/www/html/index.html | |
/usr/sbin/apache2ctl -D FOREGROUND |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment