🚧 feat: Update docker-compose configuration and entrypoint script to add health checks.
This commit is contained in:
parent
6ed44adec1
commit
2f1a61da47
7 changed files with 22 additions and 8 deletions
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
||||||
0.1.0
|
0.1.1
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ plugins {
|
||||||
}
|
}
|
||||||
|
|
||||||
group = 'telegram.files'
|
group = 'telegram.files'
|
||||||
version = '0.1.0'
|
version = '0.1.1'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import io.vertx.core.Vertx;
|
||||||
public class Start {
|
public class Start {
|
||||||
private static final Log log = LogFactory.get();
|
private static final Log log = LogFactory.get();
|
||||||
|
|
||||||
public static final String VERSION = "0.1.0";
|
public static final String VERSION = "0.1.1";
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
Vertx vertx = Vertx.vertx();
|
Vertx vertx = Vertx.vertx();
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,14 @@
|
||||||
services:
|
services:
|
||||||
telegram-files:
|
telegram-files:
|
||||||
container_name: telegram-files
|
container_name: telegram-files
|
||||||
image: telegram-files:latest
|
image: ghcr.io/jarvis2f/telegram-files:latest
|
||||||
restart: always
|
restart: always
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:80/"]
|
test: [ "CMD", "wget", "--spider", "--quiet", "--timeout=3", "--tries=1", "http://localhost:8080/health" ]
|
||||||
|
interval: 30s
|
||||||
|
retries: 3
|
||||||
|
timeout: 10s
|
||||||
|
start_period: 5s
|
||||||
environment:
|
environment:
|
||||||
APP_ENV: ${APP_ENV:-prod}
|
APP_ENV: ${APP_ENV:-prod}
|
||||||
APP_ROOT: ${APP_ROOT:-/app/data}
|
APP_ROOT: ${APP_ROOT:-/app/data}
|
||||||
|
|
@ -13,4 +17,4 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- "6543:80"
|
- "6543:80"
|
||||||
volumes:
|
volumes:
|
||||||
- ./telegram-files:/app/data
|
- ./data:/app/data
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ lib_path="/app/tdlib"
|
||||||
if [ ! -d "$lib_path" ]; then
|
if [ ! -d "$lib_path" ]; then
|
||||||
echo "Downloading TDLib..."
|
echo "Downloading TDLib..."
|
||||||
mkdir -p $lib_path
|
mkdir -p $lib_path
|
||||||
wget -q -O libs.zip https://github.com/p-vorobyev/spring-boot-starter-telegram/releases/download/1.15.0/libs.zip
|
wget --no-check-certificate -q -O libs.zip https://github.com/p-vorobyev/spring-boot-starter-telegram/releases/download/1.15.0/libs.zip
|
||||||
unzip -q libs.zip -d $lib_path
|
unzip -q libs.zip -d $lib_path
|
||||||
rm libs.zip
|
rm libs.zip
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "telegram-files-web",
|
"name": "telegram-files-web",
|
||||||
"version": "0.1.0",
|
"version": "0.1.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
||||||
10
web/src/app/account/[accountId]/layout.tsx
Normal file
10
web/src/app/account/[accountId]/layout.tsx
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
import React from "react";
|
||||||
|
import { TelegramChatProvider } from "@/hooks/use-telegram-chat";
|
||||||
|
|
||||||
|
export default function AccountLayout({
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return <TelegramChatProvider>{children}</TelegramChatProvider>;
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue