Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
.yardoc/
app.json
bin/
!bin/docker-healthcheck
coverage/
docs/
Dockerfile
Expand Down
14 changes: 3 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,7 @@ ENV PORT=4000 \
EXPOSE $PORT

HEALTHCHECK --interval=30m --timeout=60s --start-period=5s \
CMD ruby -ruri -rnet/http -e ' \
port = ENV.fetch("PORT", "4000") \
token = ENV["HEALTH_CHECK_TOKEN"] \
token = "CHANGE_ME_HEALTH_CHECK_TOKEN" if token.nil? || token.empty? \
uri = URI("http://localhost:#{port}/api/v1/health") \
request = Net::HTTP::Get.new(uri) \
request["Authorization"] = "Bearer #{token}" \
response = Net::HTTP.start(uri.hostname, uri.port) { |http| http.request(request) } \
exit(response.is_a?(Net::HTTPSuccess) ? 0 : 1) \
'
CMD ["/app/bin/docker-healthcheck"]

ARG USER=html2rss
ARG UID=991
Expand All @@ -91,9 +82,10 @@ RUN apk add --no-cache \

WORKDIR /app

USER html2rss
USER 991

COPY --from=builder /usr/local/bundle /usr/local/bundle
COPY --chown=$USER:$USER bin/docker-healthcheck ./bin/docker-healthcheck
COPY --chown=$USER:$USER Gemfile Gemfile.lock app.rb config.ru ./
COPY --chown=$USER:$USER app ./app
COPY --chown=$USER:$USER config ./config
Expand Down
20 changes: 20 additions & 0 deletions bin/docker-healthcheck
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

require 'uri'
require 'net/http'

port = ENV.fetch('PORT', '4000')
token = ENV.fetch('HEALTH_CHECK_TOKEN', nil)
token = 'CHANGE_ME_HEALTH_CHECK_TOKEN' if token.nil? || token.empty?

uri = URI("http://localhost:#{port}/api/v1/health")
request = Net::HTTP::Get.new(uri)
request['Authorization'] = "Bearer #{token}"

begin
response = Net::HTTP.start(uri.hostname, uri.port) { |http| http.request(request) }
exit(response.is_a?(Net::HTTPSuccess) ? 0 : 1)
rescue StandardError
exit(1)
end
28 changes: 14 additions & 14 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,29 @@
"test:e2e": "playwright test"
},
"dependencies": {
"preact": "^10.29.3",
"preact": "^10.29.7",
"tslib": "^2.8.1"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@hey-api/openapi-ts": "^0.99.0",
"@playwright/test": "^1.61.1",
"@preact/preset-vite": "^2.10.5",
"@testing-library/jest-dom": "^6.9.1",
"@playwright/test": "^1.62.0",
"@preact/preset-vite": "^2.10.6",
"@testing-library/jest-dom": "^7.0.0",
"@testing-library/preact": "^3.2.4",
"baseline-browser-mapping": "^2.10.40",
"eslint": "^10.6.0",
"baseline-browser-mapping": "^2.11.6",
"eslint": "^10.8.0",
"eslint-plugin-react-hooks": "^7.1.1",
"eslint-plugin-unicorn": "^69.0.0",
"globals": "^17.7.0",
"jsdom": "^29.1.1",
"msw": "^2.14.6",
"prettier": "^3.9.4",
"stylelint": "^17.14.0",
"globals": "^17.8.0",
"jsdom": "^30.0.1",
"msw": "^2.15.0",
"prettier": "^3.9.6",
"stylelint": "^17.14.1",
"stylelint-config-standard": "^40.0.0",
"typescript": "^6.0.3",
"typescript-eslint": "^8.62.1",
"vite": "^8.1.2",
"vitest": "^4.1.9"
"typescript-eslint": "^8.65.0",
"vite": "^8.1.5",
"vitest": "^4.1.10"
}
}
Loading
Loading