diff --git a/.env b/.env index 0949cc0..cee2e3e 100644 --- a/.env +++ b/.env @@ -1,3 +1,3 @@ -REACT_APP_BACKEND_BASEURL=http://localhost:5000 +REACT_APP_BACKEND_BASEURL=https://api.tempfiles.ml # dev - http://localhost:5000 -# main - https://tfb.minpeter.cf \ No newline at end of file +# main - https://tfb.minpeter.cf diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml index 5989422..ae04919 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -16,8 +16,11 @@ jobs: - name: Set up Nodejs uses: actions/setup-node@v3 - with: - node-version: 16 + with: + node-version: 16 + + - name: Install dependencies + run: npm install - name: Build run: npm run build diff --git a/Dockerfile b/Dockerfile index a86fb23..474dbc6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,9 @@ FROM nginx:latest -COPY build /usr/share/nginx/html +# Copy the nginx configuration file +COPY nginx.conf /etc/nginx/nginx.conf + +COPY build /etc/nginx/html EXPOSE 80 diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..93bfc74 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,14 @@ +events {} + +http { + server { + listen 80; + location / { + + if (!-e $request_filename) { + rewrite ^(.*)$ /index.html break; + } + + } + } +} \ No newline at end of file