Skip to content

Commit a48be45

Browse files
committed
better logs
1 parent c57792e commit a48be45

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

.github/actions/run-docker/action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ runs:
3232
using: 'composite'
3333
steps:
3434
- name: Run Docker Container
35+
id: run
36+
continue-on-error: true
3537
shell: bash
3638
run: |
3739
# Start the specified services
@@ -52,6 +54,8 @@ runs:
5254
EOF
5355
5456
- name: Logs
55-
if: ${{ inputs.logs }}
57+
if: ${{ steps.run.outcome == 'failure' }} && ${{ inputs.logs }}
5658
shell: bash
57-
run: docker compose logs
59+
run: |
60+
docker compose logs
61+
exit 1

docker/nginx/addons.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ server {
4949
try_files $uri @olympia;
5050
}
5151

52-
location ~ ^/(__version__|__heartbeat__|__healthcheck__)$ {
52+
location ~ ^/(__version__|__heartbeat__|__healthcheck__)(\?.*)?$ {
5353
try_files $uri @olympia;
5454
}
5555

scripts/health_check.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ def _fetch(self, path: str) -> dict[str, str] | None:
3838
data = response.json()
3939
except (requests.exceptions.HTTPError, json.JSONDecodeError) as e:
4040
if self.verbose:
41-
print(e, data)
41+
print({
42+
'error': e,
43+
'data': data,
44+
'response': response,
45+
})
4246

4347
if self.verbose and data is not None:
4448
print(json.dumps(data, indent=2))

0 commit comments

Comments
 (0)