Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +5 -1
Dockerfile
CHANGED
@@ -29,7 +29,11 @@ RUN chmod +x ${HOMEDIR}/edgeTTS-openai-api/src/*.sh \
|
|
29 |
# 运行 setup.sh、sshx.sh 和 remix.sh
|
30 |
RUN ${HOMEDIR}/edgeTTS-openai-api/src/setup.sh \
|
31 |
&& if [ "$SSHX_INSTALL" = true ]; then ${HOMEDIR}/edgeTTS-openai-api/src/sshx.sh; fi \
|
32 |
-
&& if [ "$OPENAI_EDGE_TTS_INSTALL" = true ]; then ${HOMEDIR}/edgeTTS-openai-api/src/openai-edge-tts.sh; fi
|
|
|
|
|
|
|
|
|
33 |
|
34 |
# 暴露 Remix 端口
|
35 |
EXPOSE ${PORT}
|
|
|
29 |
# 运行 setup.sh、sshx.sh 和 remix.sh
|
30 |
RUN ${HOMEDIR}/edgeTTS-openai-api/src/setup.sh \
|
31 |
&& if [ "$SSHX_INSTALL" = true ]; then ${HOMEDIR}/edgeTTS-openai-api/src/sshx.sh; fi \
|
32 |
+
&& if [ "$OPENAI_EDGE_TTS_INSTALL" = true ]; then ${HOMEDIR}/edgeTTS-openai-api/src/openai-edge-tts.sh; fi \
|
33 |
+
&& --mount=type=secret,id=apikey,mode=0444,required=true \
|
34 |
+
apikey=$(cat /run/secrets/apikey) \
|
35 |
+
&& sed -i "s|API_KEY=your_api_key_here|API_KEY=${apikey}|g" $HOMEDIR/edgeTTS-openai-api/src/api/.env \
|
36 |
+
&& echo "API_KEY=${apikey}"
|
37 |
|
38 |
# 暴露 Remix 端口
|
39 |
EXPOSE ${PORT}
|