Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +4 -6
Dockerfile
CHANGED
@@ -27,15 +27,13 @@ RUN chmod +x ${HOMEDIR}/edgeTTS-openai-api/src/*.sh \
|
|
27 |
&& ls -la ${HOMEDIR}/edgeTTS-openai-api
|
28 |
|
29 |
# 运行 setup.sh、sshx.sh 和 remix.sh
|
30 |
-
RUN
|
|
|
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 |
-
&& 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}
|
40 |
|
41 |
-
ENTRYPOINT ["/home/pn/edgeTTS-openai-api/src/startup.sh"]
|
|
|
27 |
&& ls -la ${HOMEDIR}/edgeTTS-openai-api
|
28 |
|
29 |
# 运行 setup.sh、sshx.sh 和 remix.sh
|
30 |
+
RUN --mount=type=secret,id=apikey,mode=0444,required=true \
|
31 |
+
${HOMEDIR}/edgeTTS-openai-api/src/setup.sh \
|
32 |
&& if [ "$SSHX_INSTALL" = true ]; then ${HOMEDIR}/edgeTTS-openai-api/src/sshx.sh; fi \
|
33 |
&& if [ "$OPENAI_EDGE_TTS_INSTALL" = true ]; then ${HOMEDIR}/edgeTTS-openai-api/src/openai-edge-tts.sh; fi \
|
34 |
+
&& echo $(cat /run/secrets/apikey)
|
|
|
|
|
|
|
35 |
|
36 |
# 暴露 Remix 端口
|
37 |
EXPOSE ${PORT}
|
38 |
|
39 |
+
ENTRYPOINT ["/home/pn/edgeTTS-openai-api/src/startup.sh"]
|