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 5acc46c commit 2288941
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,19 @@ COPY --from=builder /app/build /usr/share/nginx/html/
WORKDIR /usr/share/nginx/html
COPY ./env.sh .
COPY .env .
COPY .env-config.js .

USER root

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

# Make our shell script executable
RUN chmod +x env.sh

RUN /usr/share/nginx/html/env.sh
RUN chmod +x env.sh && chmod 777 /usr/share/nginx/html/env-config.js

EXPOSE 8080

USER nginx

# Start Nginx server
CMD ["/bin/bash", "-c", "nginx -g \"daemon off;\""]
CMD ["/bin/bash", "-c", "/usr/share/nginx/html/env.sh && nginx -g \"daemon off;\""]

0 comments on commit 2288941

Please # to comment.