Skip to content

Commit 01cf354

Browse files
committed
feat(send): SEND_URL and SIGN_KEY now settable with build-vars
1 parent c84e02f commit 01cf354

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,5 +163,10 @@ ADD train_dreambooth.py .
163163
ADD send.py .
164164
ADD app.py .
165165

166+
ARG SEND_URL
167+
ENV SEND_URL=${SEND_URL}
168+
ARG SIGN_KEY
169+
ENV SIGN_KEY=${SIGN_KEY}
170+
166171
CMD python3 -u server.py
167172

send.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ def get_now():
1616

1717

1818
send_url = os.getenv("SEND_URL")
19+
if send_url == "":
20+
send_url = None
21+
1922
sign_key = os.getenv("SIGN_KEY")
23+
if sign_key == "":
24+
sign_key = None
25+
2026
init_time = get_now()
2127
session = FuturesSession()
2228
last_time = init_time

0 commit comments

Comments
 (0)