mirror of
https://github.com/bitwarden/server.git
synced 2024-11-21 12:05:42 +01:00
health checks for docker
This commit is contained in:
parent
d9d2dea784
commit
f78b212aa8
@ -105,4 +105,8 @@ csharp_new_line_before_else = true
|
||||
csharp_new_line_before_catch = true
|
||||
csharp_new_line_before_finally = true
|
||||
csharp_new_line_before_members_in_object_initializers = true
|
||||
csharp_new_line_before_members_in_anonymous_types = true
|
||||
csharp_new_line_before_members_in_anonymous_types = true
|
||||
|
||||
# All files
|
||||
[*]
|
||||
guidelines = 120
|
||||
|
@ -5,6 +5,7 @@ LABEL com.bitwarden.product="bitwarden"
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
gosu \
|
||||
curl \
|
||||
libcurl3 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@ -15,4 +16,6 @@ COPY obj/Docker/publish .
|
||||
COPY entrypoint.sh /
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
HEALTHCHECK CMD curl -f http://localhost:5000 || exit 1
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
@ -5,6 +5,7 @@ LABEL com.bitwarden.product="bitwarden"
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
gosu \
|
||||
curl \
|
||||
libcurl3 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@ -15,4 +16,6 @@ COPY obj/Docker/publish/Api .
|
||||
COPY entrypoint.sh /
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
HEALTHCHECK CMD curl -f http://localhost:5000/alive || exit 1
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
@ -6,6 +6,14 @@ namespace Billing.Controllers
|
||||
{
|
||||
public class HomeController : Controller
|
||||
{
|
||||
[HttpGet("~/alive")]
|
||||
[HttpGet("~/now")]
|
||||
[AllowAnonymous]
|
||||
public DateTime GetAlive()
|
||||
{
|
||||
return DateTime.UtcNow;
|
||||
}
|
||||
|
||||
/*
|
||||
[Authorize]
|
||||
public IActionResult Index()
|
||||
|
@ -32,6 +32,14 @@ namespace Bit.Events.Controllers
|
||||
_cipherRepository = cipherRepository;
|
||||
}
|
||||
|
||||
[HttpGet("~/alive")]
|
||||
[HttpGet("~/now")]
|
||||
[AllowAnonymous]
|
||||
public DateTime GetAlive()
|
||||
{
|
||||
return DateTime.UtcNow;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> Post([FromBody]IEnumerable<EventModel> model)
|
||||
{
|
||||
|
@ -5,6 +5,7 @@ LABEL com.bitwarden.product="bitwarden"
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
gosu \
|
||||
curl \
|
||||
libcurl3 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@ -15,4 +16,6 @@ COPY obj/Docker/publish/Events .
|
||||
COPY entrypoint.sh /
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
HEALTHCHECK CMD curl -f http://localhost:5000/alive || exit 1
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
@ -5,6 +5,7 @@ LABEL com.bitwarden.product="bitwarden"
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
gosu \
|
||||
curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV ASPNETCORE_URLS http://+:5000
|
||||
@ -14,4 +15,6 @@ COPY obj/Docker/publish .
|
||||
COPY entrypoint.sh /
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
HEALTHCHECK CMD curl -f http://localhost:5000/google.com/icon.png || exit 1
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
@ -5,6 +5,7 @@ LABEL com.bitwarden.product="bitwarden"
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
gosu \
|
||||
curl \
|
||||
libcurl3 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@ -15,4 +16,6 @@ COPY obj/Docker/publish .
|
||||
COPY entrypoint.sh /
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
HEALTHCHECK CMD curl -f http://localhost:5000/.well-known/openid-configuration || exit 1
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System.IO;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Bit.Core.Utilities;
|
||||
@ -19,6 +20,14 @@ namespace Bit.Notifications
|
||||
_hubContext = hubContext;
|
||||
}
|
||||
|
||||
[HttpGet("~/alive")]
|
||||
[HttpGet("~/now")]
|
||||
[AllowAnonymous]
|
||||
public DateTime GetAlive()
|
||||
{
|
||||
return DateTime.UtcNow;
|
||||
}
|
||||
|
||||
[HttpPost("~/send")]
|
||||
public async Task PostSend()
|
||||
{
|
||||
|
@ -5,6 +5,7 @@ LABEL com.bitwarden.product="bitwarden"
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
gosu \
|
||||
curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV ASPNETCORE_URLS http://+:5000
|
||||
@ -14,4 +15,6 @@ COPY obj/Docker/publish .
|
||||
COPY entrypoint.sh /
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
HEALTHCHECK CMD curl -f http://localhost:5000/alive || exit 1
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
Loading…
Reference in New Issue
Block a user