Skip to content

Commit

Permalink
env shell runnin properly
Browse files Browse the repository at this point in the history
  • Loading branch information
cdebarros committed Feb 19, 2024
1 parent 6c56dd7 commit f09fd08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,14 @@ COPY --from=builder /app/build /usr/share/nginx/html/
WORKDIR /usr/share/nginx/html
COPY ./env.sh .
COPY .env .
RUN touch /usr/share/nginx/html/env-config.js

USER root

# Add bash
RUN apk add --no-cache bash

# Make our shell script executable
RUN chmod +x env.sh && chmod 777 /usr/share/nginx/html/env-config.js
RUN chmod +x env.sh

EXPOSE 8080

Expand Down
4 changes: 2 additions & 2 deletions env.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

# Recreate config file
rm -rf ./env-config.js
touch ./env-config.js
# rm -rf ./env-config.js
# touch ./env-config.js

# Add assignment
echo "window._env_ = {" >> ./env-config.js
Expand Down

0 comments on commit f09fd08

Please # to comment.