chore: update Dockerfile

This commit is contained in:
jmal 2024-05-22 15:52:27 +08:00
parent 47c5ad0856
commit d01ca8b20c
3 changed files with 5 additions and 2 deletions

View File

@ -6,7 +6,7 @@ COPY nginx.conf /etc/nginx/nginx.conf.template
COPY dist /var/www/public
COPY config.js /var/www/public
COPY config.js.template /var/www/public/config.js.template
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh

View File

@ -1,4 +1,7 @@
#!/bin/bash
set -e
envsubst < /var/www/public/config.js > /var/www/public/config.js
export API_URL=
export API_OFFICE_URL=
envsubst '${API_URL} ${API_OFFICE_URL}' < /var/www/public/config.js.template > /var/www/public/config.js
cat /var/www/public/config.js
exec "$@"