From 2a0f65fca7d9dad9a4966e8d1518b4bdf5f9d370 Mon Sep 17 00:00:00 2001 From: can kurttekin Date: Tue, 5 Nov 2024 09:52:08 +0300 Subject: [PATCH] env var to docker compose --- backend/docker-compose.yml | 8 ++++---- frontend/src/components/AITools.js | 10 ++++++---- frontend/src/components/Home.js | 10 ++++++++-- frontend/src/locales/en.json | 9 +++++---- frontend/src/locales/tr.json | 9 +++++---- frontend/src/styles/Home.css | 9 +++++---- 6 files changed, 33 insertions(+), 22 deletions(-) diff --git a/backend/docker-compose.yml b/backend/docker-compose.yml index a69d2660..885e8c17 100644 --- a/backend/docker-compose.yml +++ b/backend/docker-compose.yml @@ -8,8 +8,8 @@ services: - "443:443" environment: SPRING_DATASOURCE_URL: jdbc:postgresql://db:5432/job_app_tracker - SPRING_DATASOURCE_USERNAME: admin - SPRING_DATASOURCE_PASSWORD: password + SPRING_DATASOURCE_USERNAME: ${DB_USER} + SPRING_DATASOURCE_PASSWORD: ${DB_PASS} SPRING_JPA_HIBERNATE_DDL_AUTO: update KEY_STORE_ALIAS: ${KEY_STORE_ALIAS} KEY_STORE_PASS: ${KEY_STORE_PASS} @@ -23,8 +23,8 @@ services: image: postgres:14 environment: POSTGRES_DB: job_app_tracker - POSTGRES_USER: admin - POSTGRES_PASSWORD: password + POSTGRES_USER: ${DB_USER} + POSTGRES_PASSWORD: ${DB_PASS} ports: - "5432:5432" volumes: diff --git a/frontend/src/components/AITools.js b/frontend/src/components/AITools.js index 76cec235..d41e3c5d 100644 --- a/frontend/src/components/AITools.js +++ b/frontend/src/components/AITools.js @@ -103,7 +103,8 @@ const AITools = () => { setSelectedJobApplication(response.data[0]); // Set the first job application as selected } } catch (error) { - console.error("Error fetching job applications:", error); + //console.error("Error fetching job applications:", error); + console.error("Error fetching job applications:"); } }; @@ -135,12 +136,13 @@ const AITools = () => { headers: { Authorization: `Bearer ${token}` } }); - console.log("Interview Response Data:", response.data); + //console.log("Interview Response Data:", response.data); if (Array.isArray(response.data.questions)) { setInterviewQuestions(response.data.questions); } else { - console.error("No interview questions found in response:", response.data); + //console.error("No interview questions found in response:", response.data); + console.error("No interview questions found in response:"); setInterviewQuestions([]); } } catch (error) { @@ -166,7 +168,7 @@ const AITools = () => { headers: { Authorization: `Bearer ${token}` } }); - console.log("Quiz Response Data:", response.data); + //console.log("Quiz Response Data:", response.data); if (Array.isArray(response.data)) { const formattedQuestions = response.data.map((q) => ({ diff --git a/frontend/src/components/Home.js b/frontend/src/components/Home.js index 5618c90b..268351f0 100644 --- a/frontend/src/components/Home.js +++ b/frontend/src/components/Home.js @@ -4,8 +4,9 @@ import organizeImage from '../assets/organize.png'; import filterImage from '../assets/filter.png'; import starsImage from '../assets/stars.png'; import goalsImage from '../assets/goal.png'; +import aiImage from '../assets/ai.png'; import buyMeACoffeeImage from '../assets/buy-me-a-beer.png'; -import separator from '../assets/seperator.png'; +import separator from '../assets/separator.png'; import { useNavigate } from 'react-router-dom'; import { AuthContext } from '../contexts/AuthContext'; import styled from "styled-components"; @@ -60,10 +61,15 @@ const Home = () => { Illustration 3

{t('illustrations.filter')}

+
+ Illustration 4 +

{t('illustrations.ai')}

+
Illustration 4

{t('illustrations.goal')}

+
@@ -99,7 +105,7 @@ const Home = () => {