From dd0af4525c665251b4cfee75ffd1a8e2574c93b0 Mon Sep 17 00:00:00 2001 From: Mohammad Shafiee Date: Thu, 8 Aug 2024 10:07:49 +0200 Subject: [PATCH] update Dockerfile --- Dockerfile | 5 ++--- Makefile | 1 - run.sh | 11 +---------- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6ad1c65..87239c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,14 +21,13 @@ WORKDIR /app COPY --from=builder /app/webBridgeBot /app/webBridgeBot # Copy the run script -COPY run.sh /app/run.sh +COPY templates /app/templates # Set the permissions for the binary and the run script RUN chmod +x /app/webBridgeBot -RUN chmod +x /app/run.sh # Expose the application's port EXPOSE 8080 # Run the webBridgeBot binary -CMD ["/app/run.sh"] +CMD ["/app/webBridgeBot"] diff --git a/Makefile b/Makefile index f0222ee..4fc4756 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,6 @@ # Makefile for cloning, building TDLib, building OpenSSL, and building a Go application (webBridgeBot) that uses TDLib # Define variables -TDLIB_DIR=$(CURDIR)/tdlib DOCKER_IMAGE_NAME=webbridgebot DOCKER_TAG=latest DOCKER_USERNAME=mshafiee diff --git a/run.sh b/run.sh index b3a534e..1bfe4fa 100644 --- a/run.sh +++ b/run.sh @@ -12,13 +12,4 @@ MAX_CACHE_SIZE=${MAX_CACHE_SIZE:-10737418240} # 10 GB in bytes DEBUG_MODE=${DEBUG_MODE:-false} # Execute the Go application with command-line flags -./webBridgeBot \ - -apiID="$API_ID" \ - -apiHash="$API_HASH" \ - -botToken="$BOT_TOKEN" \ - -baseURL="$BASE_URL" \ - -port="$PORT" \ - -hashLength="$HASH_LENGTH" \ - -cacheDirectory="$CACHE_DIRECTORY" \ - -maxCacheSize="$MAX_CACHE_SIZE" \ - -debugMode="$DEBUG_MODE" +./webBridgeBot \ No newline at end of file