changed redirect on netlify

This commit is contained in:
2022-12-23 00:44:56 -03:00
parent 4b9d6e366d
commit 45a4068a65
3 changed files with 4 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ FROM alpine:latest as build
ENV REACT_APP_FIREBASE_API_KEY = ${REACT_APP_FIREBASE_API_KEY}
ENV REACT_APP_FIREBASE_APP_ID = ${REACT_APP_FIREBASE_APP_ID}
ENV REACT_APP_ENVIRONMENT = ${REACT_APP_ENVIRONMENT}
ENV DEPLOY_SERVICE = ${DEPLOY_SERVICE}
RUN apk add --update nodejs npm
RUN npm install --global yarn
@@ -12,6 +13,7 @@ WORKDIR /usr/src
RUN yarn
RUN yarn build
RUN if [[ DEPLOY_SERVICE !== caprover ]]; then echo '/* https://clockify-pomodoro-timer.franp.site 200' | cat >build/_redirects fi
FROM nginx:1.23.1-alpine
EXPOSE 80

View File

@@ -9,3 +9,4 @@ services:
- REACT_APP_FIREBASE_API_KEY: {REACT_APP_FIREBASE_API_KEY}
- REACT_APP_FIREBASE_APP_ID: {REACT_APP_FIREBASE_APP_ID}
- REACT_APP_ENVIRONMENT: {REACT_APP_ENVIRONMENT}
- DEPLOY_SERVICE: {DEPLOY_SERVICE}

View File

@@ -21,7 +21,7 @@
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build --openssl-legacy-provider && echo '/* /index.html 200' | cat >build/_redirects",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},