Skip to content

Commit

Permalink
Merge pull request #6 from DefGuard/deployment_update
Browse files Browse the repository at this point in the history
chore: deployment update
  • Loading branch information
wojcik91 authored Aug 11, 2023
2 parents ad4193f + 597fdcb commit 75a5220
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build latest image
name: Build current image
on:
push:
branches:
Expand All @@ -8,7 +8,7 @@ on:
- 'LICENSE'

jobs:
publish:
build:
runs-on: self-hosted
steps:
- name: Docker meta
Expand All @@ -18,7 +18,7 @@ jobs:
images: |
ghcr.io/defguard/defguard-proxy
tags: |
type=raw,value=latest
type=raw,value=current
type=ref,event=branch
type=sha
- name: Login to GitHub container registry
Expand Down
5 changes: 5 additions & 0 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ async fn app_info() -> ApiResult<Json<AppInfo>> {
Ok(Json(AppInfo { version }))
}

async fn healthcheck() -> &'static str {
"I'm alive!"
}

pub async fn run_server(config: Config) -> anyhow::Result<()> {
info!("Starting Defguard proxy server");

Expand Down Expand Up @@ -78,6 +82,7 @@ pub async fn run_server(config: Config) -> anyhow::Result<()> {
"/api/v1",
Router::new()
.nest("/enrollment", enrollment::router())
.route("/health", get(healthcheck))
.route("/info", get(app_info)),
)
.nest_service("/svg", serve_images)
Expand Down

0 comments on commit 75a5220

Please sign in to comment.