diff --git a/project/.env.sh b/project/.env.sh deleted file mode 100644 index de11626..0000000 --- a/project/.env.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -for i in $(env | grep MY_APP_) -do - key=$(echo $i | cut -d '=' -f 1) - value=$(echo $i | cut -d '=' -f 2-) - echo $key=$value - # sed All files - # find /usr/share/nginx/html -type f -exec sed -i "s|${key}|${value}|g" '{}' + - - # sed JS and CSS only - find /usr/share/nginx/html -type f \( -name '*.js' -o -name '*.css' \) -exec sed -i "s|${key}|${value}|g" '{}' + -done \ No newline at end of file diff --git a/project/Dockerfile b/project/Dockerfile index c3e30d8..7e4ca53 100644 --- a/project/Dockerfile +++ b/project/Dockerfile @@ -23,7 +23,7 @@ COPY --from=build /app/dist /usr/share/nginx/html COPY ./nginx.conf /etc/nginx/conf.d/default.conf -COPY env.sh /docker-entrypoint.d/env.sh +COPY ./env.sh /docker-entrypoint.d/env.sh RUN chmod +x /docker-entrypoint.d/env.sh EXPOSE 80