diff options
| author | Freya Murphy <freya@freyacat.org> | 2024-12-25 12:32:15 -0500 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2024-12-25 12:32:15 -0500 |
| commit | 170f39e70736baff4b7c0ffe7d91c1bdf409532b (patch) | |
| tree | 400e497e102b1b2ca6fe175f2a0c2a90a060f932 /build | |
| parent | update version (diff) | |
| download | xssbook2-170f39e70736baff4b7c0ffe7d91c1bdf409532b.tar.gz xssbook2-170f39e70736baff4b7c0ffe7d91c1bdf409532b.tar.bz2 xssbook2-170f39e70736baff4b7c0ffe7d91c1bdf409532b.zip | |
make shim a container once again
Diffstat (limited to '')
| -rw-r--r-- | build/shim/Dockerfile | 17 | ||||
| -rwxr-xr-x | build/shim/shim.php (renamed from shim/shim.php) | 4 |
2 files changed, 19 insertions, 2 deletions
diff --git a/build/shim/Dockerfile b/build/shim/Dockerfile new file mode 100644 index 0000000..986b931 --- /dev/null +++ b/build/shim/Dockerfile @@ -0,0 +1,17 @@ +FROM alpine:latest + +# install packages +RUN apk add --no-cache \ + php84 \ + php84-pdo \ + php84-pdo_sqlite \ + php84-pdo_pgsql \ + tini + +# copy scripts +COPY ./shim.php /usr/local/bin/shim.php +RUN chmod +x /usr/local/bin/shim.php + +# run +ENTRYPOINT ["/sbin/tini", "--"] +CMD ["/usr/local/bin/shim.php"] diff --git a/shim/shim.php b/build/shim/shim.php index eb84412..0c91513 100755 --- a/shim/shim.php +++ b/build/shim/shim.php @@ -1,9 +1,9 @@ -#!/usr/bin/env php +#!/usr/bin/env php84 <?php /* Copyright (c) 2024 Freya Murphy */ function wait_until_ready() { while (TRUE) { - if (file_exists("/status/ready")) { + if (file_exists("/var/run/crimson/db-ready")) { echo "database ready!\n"; break; } |