-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from axelpavageau/feature/parametrized-build
chore: setting color dynamically
- Loading branch information
Showing
4 changed files
with
29 additions
and
12 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,19 @@ | ||
FROM nginx:latest | ||
|
||
ARG COLOR | ||
ARG COLOR_CODE | ||
|
||
COPY default.conf /etc/nginx/conf.d/ | ||
COPY index.html /usr/share/nginx/html/ | ||
COPY content.json /usr/share/nginx/html/ | ||
|
||
RUN sed -i 's/{{COLOR}}/'"$COLOR"'/g' /usr/share/nginx/html/index.html | ||
RUN sed -i 's/{{COLOR}}/'"$COLOR"'/g' /usr/share/nginx/html/content.json | ||
|
||
RUN /usr/sbin/nginx -t | ||
CMD nginx -g 'daemon off;' | ||
|
||
CMD ["nginx", "-g", "daemon off;"] | ||
EXPOSE 80 8080 | ||
|
||
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ | ||
CMD curl -f http://localhost/ || exit 1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"color": "blue"} | ||
{ "color": "{{COLOR}}" } |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<HTML> | ||
<body style="background-color:#0000AA;"> | ||
<h1><font color="#FFFFFF">blue</font></h1> | ||
<body style="background-color:{{COLOR}};"> | ||
<h1> | ||
<font color="#FFFFFF">{{COLOR}}</font> | ||
</h1> | ||
</body> | ||
</HTML> |