= commited on
Commit
4ca9890
·
1 Parent(s): 35d7781

update passes to env vars

Browse files
Files changed (2) hide show
  1. Dockerfile +11 -0
  2. lib/Transcriber.jl +2 -2
Dockerfile CHANGED
@@ -19,6 +19,17 @@ RUN echo 'export PATH="/home/genie/venv/bin:$PATH"' >> /home/genie/.bashrc
19
  RUN mkdir -p /home/genie/.julia/config && \
20
  echo 'ENV["PYTHON"] = "/home/genie/venv/bin/python"' >> /home/genie/.julia/config/startup.jl
21
 
 
 
 
 
 
 
 
 
 
 
 
22
  EXPOSE 8000
23
  EXPOSE 80
24
  ENV JULIA_DEPOT_PATH "/home/genie/.julia"
 
19
  RUN mkdir -p /home/genie/.julia/config && \
20
  echo 'ENV["PYTHON"] = "/home/genie/venv/bin/python"' >> /home/genie/.julia/config/startup.jl
21
 
22
+ # Create environment variable from secret
23
+ RUN --mount=type=secret,id=WEBSHAREPASS,mode=0444,required=true \
24
+ export WEBSHAREUSER=$(cat /run/secrets/WEBSHAREUSER) && \
25
+ echo "export WEBSHAREUSER=$WEBSHAREUSER" >> /home/genie/.bashrc
26
+
27
+ # Create environment variable from secret
28
+ RUN --mount=type=secret,id=WEBSHAREPASS,mode=0444,required=true \
29
+ export WEBSHAREPASS=$(cat /run/secrets/WEBSHAREPASS) && \
30
+ echo "export WEBSHAREPASS=$WEBSHAREPASS" >> /home/genie/.bashrc
31
+
32
+
33
  EXPOSE 8000
34
  EXPOSE 80
35
  ENV JULIA_DEPOT_PATH "/home/genie/.julia"
lib/Transcriber.jl CHANGED
@@ -13,8 +13,8 @@ function __init__()
13
  print(f"Debug - Found webshareuser: {'YES' if webshareuser else 'NO'}")
14
  print(f"Debug - Found websharepass: {'YES' if websharepass else 'NO'}")
15
 
16
- webshareuser = os.environ.get("webshareuser") # Changed from webuser to webshareuser
17
- websharepass = os.environ.get("websharepass")
18
  ytt_api = YouTubeTranscriptApi(
19
  proxy_config=WebshareProxyConfig(
20
  proxy_username=webshareuser,
 
13
  print(f"Debug - Found webshareuser: {'YES' if webshareuser else 'NO'}")
14
  print(f"Debug - Found websharepass: {'YES' if websharepass else 'NO'}")
15
 
16
+ webshareuser = os.environ.get("WEBSHAREUSER") # Changed from webuser to webshareuser
17
+ websharepass = os.environ.get("WEBSHAREPASS")
18
  ytt_api = YouTubeTranscriptApi(
19
  proxy_config=WebshareProxyConfig(
20
  proxy_username=webshareuser,