Skip to content

Commit

Permalink
update docker config
Browse files Browse the repository at this point in the history
  • Loading branch information
Masterain98 committed Sep 8, 2023
1 parent f771c33 commit 506f990
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ FROM python:3.11 AS builder
WORKDIR /code
ADD . /code
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
RUN pip install pyinstaller
RUN pyinstaller -F main.py

# Runtime
Expand Down
6 changes: 4 additions & 2 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
load_dotenv()

# Private Key
PRIVATE_KEY_PATH = os.getenv('PRIVATE_KEY_PATH')
PRIVATE_KEY = open(PRIVATE_KEY_PATH, "r").read()
PRIVATE_KEY = os.getenv('PRIVATE_KEY')
if PRIVATE_KEY is None:
PRIVATE_KEY_PATH = os.getenv('PRIVATE_KEY_PATH')
PRIVATE_KEY = open(PRIVATE_KEY_PATH, "r").read()
# App ID
APP_ID = os.getenv('APP_ID')
# Installation ID
Expand Down
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ imageName=dgp-github-bot
containerName=DGP-GitHub-Bot
imageVersion=1.9
externalPort=3524
internalPort=8080
internalPort=8000

oldContainer=`docker ps -a| grep ${containerName} | head -1|awk '{print $1}' `
echo Delete old container...
Expand Down

0 comments on commit 506f990

Please sign in to comment.