Compare commits

..

4 commits

Author SHA1 Message Date
b335a471cb Merge pull request 'Fix broken backend connection in prod build (fix #151)' (#152) from infra/backendconnection into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #152
2021-07-13 18:06:06 +00:00
ccd53bc2a1 replaced useState from dev.react to stable
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2021-07-13 20:04:56 +02:00
07e83e2f00 added working nginx configuration 2021-07-13 20:03:51 +02:00
d72367ccaa removed port mapping in backend as it's not needed 2021-07-13 20:03:20 +02:00
7 changed files with 13 additions and 15 deletions

View file

@ -8,8 +8,6 @@ services:
backend-prod:
image: caminsha/bt-backend
container_name: backend_bt
ports:
- 5000:5000
environment:
DEBUG: "no"
PORT: 5000

View file

@ -1,15 +1,19 @@
server {
listen 80;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
# to redirect all the requests to index.html,
# useful when you are using react-router
try_files $uri /index.html;
proxy_pass http://localhost:5000
}
location /api {
# include uwsgi_params;
# uwsgi_pass http://backend-prod:5000;
proxy_pass http://backend-prod:5000;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

View file

@ -1,10 +1,9 @@
import React, { useEffect } from "react";
import React, { useEffect, useState} from "react";
import "../../App.css";
import Footer from "../../Footer";
import { Logger } from "@behametrics/logger-web";
import { useAuth } from "../../auth/AuthProvider";
import InputField from "../InputField";
import { useState } from "react/cjs/react.development";
import SubmitField from "../SubmitField";
export default function BehaviorNormal() {

View file

@ -1,5 +1,4 @@
import React from "react";
import { useState } from "react/cjs/react.development";
import React, {useState} from "react";
import "../../App.css";
import Footer from "../../Footer";
import InputField from "../InputField";

View file

@ -1,5 +1,4 @@
import React from "react";
import { useState } from "react/cjs/react.development";
import React, {useState} from "react";
import "../../App.css";
import Footer from "../../Footer";
import InputField from "../InputField";

View file

@ -1,4 +1,4 @@
import { useEffect, useState } from "react/cjs/react.development";
import { useEffect, useState } from "react";
import { authFetch } from "../../auth/AuthProvider.js";
function Secret() {

View file

@ -1,5 +1,4 @@
import React from "react";
import { useState } from "react/cjs/react.development";
import React, {useState} from "react";
import "../../App.css";
import "../Input.css";
import Footer from "../../Footer";