Skip to content

Commit 305f1f4

Browse files
committed
fix(docker): missing curl installation for health check
Closes #725. Signed-off-by: Gil Desmarais <[email protected]>
1 parent b918342 commit 305f1f4

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ ARG UID=991
4343
ARG GID=991
4444

4545
RUN apk add --no-cache \
46+
'curl>=8' \
4647
'gcompat>=0' \
4748
'tzdata>=2024' \
4849
'libxml2>=2' \

Rakefile

+18
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,22 @@ task :test do
5151
Output.describe 'Listing docker containers matching html2rss-web-test filter'
5252
sh 'docker ps -a --filter name=html2rss-web-test'
5353

54+
Output.describe 'Expect health status to be healthy'
55+
health_status = nil
56+
10.times do
57+
health_status = `docker inspect --format='{{.State.Health.Status}}' html2rss-web-test`.strip
58+
59+
if health_status == 'healthy'
60+
puts '✅ Health status reports `healthy`'
61+
break
62+
else
63+
putc '.'
64+
sleep 1
65+
end
66+
end
67+
68+
raise "❌ Health status reports `#{health_status}`" if health_status != 'healthy'
69+
5470
Output.describe 'Generating feed from a html2rss-configs config'
5571
sh 'curl -f http://127.0.0.1:3000/dfs.de/pressemitteilungen.rss || exit 1'
5672

@@ -72,4 +88,6 @@ ensure
7288
sh 'docker stop html2rss-web-test'
7389
sh 'docker rm html2rss-web-test'
7490
end
91+
92+
exit 1 if $ERROR_INFO
7593
end

0 commit comments

Comments
 (0)