Commit 4a1f77f6 authored by Markus Mößler's avatar Markus Mößler
Browse files

enabled deployment on aidaho tinkering server

parent 72c75bc2
Loading
Loading
Loading
Loading
+26 −21
Original line number Diff line number Diff line
version: '3.8'

services:
  react-frontend:
    build:
      context: ./react-frontend
      dockerfile: Dockerfile.prod
    depends_on:
      - tornado-backend
    networks:
      - app-network      
  #react-frontend:
  #  build:
  #    context: ./react-frontend
  #    dockerfile: Dockerfile.prod
  #  depends_on:
  #    - tornado-backend
  #  networks:
  #    - app-network      

  tornado-backend:
    build: ./tornado-backend
    command: --db_host=postgres
    ports:
      - 8888:8888    
    depends_on:
      - postgres
    networks:
      - app-network
      - nginx-network 

  postgres:
    image: postgres:10.3
@@ -36,19 +39,21 @@ services:
    networks:
      - app-network      

  nginx:
    image: nginx:latest
    ports:
      - "80:80"
    volumes:
      - ./react-frontend/my-react-app/build:/usr/share/nginx/html:ro
      - ./nginx/nginx.prod.conf:/etc/nginx/nginx.conf:ro
    depends_on:
      - react-frontend
      - tornado-backend
    networks:
      - app-network
  #nginx:
  #  image: nginx:latest
  #  ports:
  #    - "80:80"
  #  volumes:
  #    - ./react-frontend/my-react-app/build:/usr/share/nginx/html:ro
  #    - ./nginx/nginx.prod.conf:/etc/nginx/nginx.conf:ro
  #  depends_on:
  #    - react-frontend
  #    - tornado-backend
  #  networks:
  #    - app-network

networks:
  app-network:
    driver: bridge
  nginx-network:
    external: true
+1 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  "name": "app",
  "version": "0.1.0",
  "private": true,
  "homepage": "/aidaho-blog-demo",
  "dependencies": {
    "bootstrap": "^5.3.3",
    "cra-template": "1.2.0",
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ function App() {
    //   </header>
    // </div>
    <UserRoleProvider>
    <Router>
    <Router basename="/aidaho-blog-demo">
      <Logo />
      <Navbar />
      <div className="container mt-5">
+2 −1
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ import config from '../config';

function Login() {

  // const navigate = useNavigate();
  const [email, setEmail] = useState('');
  const [password, setPassword] = useState('');
  
@@ -42,7 +43,7 @@ function Login() {

      console.log('logging of response status: ', response.ok);
      if (response.ok) {
        window.location.href = '/'; // Redirect to home page
        window.location.href = `${config.frontendBaseUrl}/`
      }      
    } catch (error) {
      alert('Login failed!')
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ function Register() {
      });
      console.log('logging of response status: ', response.ok);
      if (response.ok) {
        window.location.href = '/login'; // Redirect to home page
        window.location.href = `${config.frontendBaseUrl}/login`
      }      
    } catch (error) {
      alert('Registering failed!')
Loading