Skip to content

Commit 7d76c41

Browse files
committed
feat: initial version
1 parent aeb1efc commit 7d76c41

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM nginx
2+
COPY static /usr/share/nginx/html
3+
COPY on-init /pathwar-hooks/

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.PHONY: build
2+
build:
3+
docker build -t pathwar/challenge-example .
4+
5+
.PHONY: publish
6+
publish:
7+
docker push pathwar/challenge-example
8+
9+
.PHONY: run-with-pathwar
10+
run-with-pathwar: build
11+
pathwar compose run
12+
13+
.PHONY: run-with-docker
14+
run-with-docker: build
15+
docker run --name=pathwar-challenge-example -it --rm -p 8899:80 pathwar/challenge-example

on-init

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh -e
2+
3+
sed -i "s/THE_PASSPHRASE/$(pwchallenge passphrase 0)/g" /usr/share/nginx/html/index.html

static/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<h1>Hello World!</h1>
2+
3+
<p>Here is a dynamic passphrase: <b>THE_PASSPHRASE</b></p>

0 commit comments

Comments
 (0)