-
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.
- Loading branch information
0 parents
commit 7faac91
Showing
8 changed files
with
74 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
networks: | ||
internal: | ||
|
||
services: | ||
wrangler: | ||
image: 2988/wrangler | ||
build: ./wrangler | ||
depends_on: | ||
fileserver: | ||
condition: service_healthy | ||
networks: | ||
internal: | ||
healthcheck: | ||
test: netstat -an | grep 8787 > /dev/null; if [ 0 != $? ]; then exit 1; fi; | ||
start_period: 60s | ||
start_interval: 5s | ||
|
||
fileserver: | ||
image: 2988/fileserver | ||
build: ./fileserver | ||
networks: | ||
internal: | ||
healthcheck: | ||
test: netstat -an | grep 9000 > /dev/null; if [ 0 != $? ]; then exit 1; fi; | ||
start_period: 60s | ||
start_interval: 5s | ||
|
||
tests: | ||
image: 2988/tests | ||
build: ./tests | ||
depends_on: | ||
fileserver: | ||
condition: service_healthy | ||
wrangler: | ||
condition: service_healthy | ||
networks: | ||
internal: |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM alpine:3.18 | ||
RUN apk add --no-cache python3 | ||
RUN mkdir /usr/local/app/ | ||
COPY ./generate.sh /usr/local/app/ | ||
WORKDIR /usr/local/app/ | ||
RUN /bin/sh generate.sh > 10mb.html | ||
ENTRYPOINT ["python", "-m", "http.server", "9000"] |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
content=$(dd if=/dev/random bs=1MB count=10 | base64 -w0) | ||
echo "<html><head></head><body><img src='data:image/png;base64,$content' /></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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM alpine:3.18 | ||
RUN apk add --no-cache curl | ||
RUN mkdir /usr/local/app/ | ||
COPY ./tests.sh /usr/local/app/ | ||
WORKDIR /usr/local/app/ | ||
ENTRYPOINT ["/bin/sh", "tests.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#/bin/sh | ||
curl -o - http://wrangler:8787 > /dev/null | ||
curl -o - http://wrangler:8787 > /dev/null |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM node:18-slim | ||
RUN apt update && apt install net-tools | ||
RUN npm install -g [email protected] | ||
RUN mkdir /usr/local/app/ | ||
COPY ./index.js /usr/local/app/ | ||
COPY ./wrangler.toml /usr/local/app/ | ||
WORKDIR /usr/local/app/ | ||
ENTRYPOINT ["wrangler", "dev", "--ip", "0.0.0.0"] |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
async fetch(request, env, ctx) { | ||
const response = await fetch("http://fileserver:9000/10mb.html"); | ||
return response; | ||
} | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
name = "2988" | ||
main = "index.js" | ||
compatibility_date = "2024-01-01" | ||
compatibility_flags = ["nodejs_compat"] |