From 0d42eda749ec23a52b8e445c03920924bd4961e3 Mon Sep 17 00:00:00 2001 From: Elisee ADJIGUIDI Date: Fri, 23 Jun 2023 15:38:58 +0200 Subject: [PATCH] change --- .env | 8 ++++---- conf/init.sql | 2 +- conf/nginx.conf | 4 ++-- containers/api/src/config/config.service.ts | 6 +++--- containers/react/.env | 2 +- containers/react/package.json | 2 +- docker-compose.yml | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.env b/.env index aae0c767..ae4dd442 100644 --- a/.env +++ b/.env @@ -14,15 +14,15 @@ NGINX_ENVSUBST_TEMPLATE_SUFFIX=".conf" # BASE_URL=http://localhost -BASE_URL=localhost -REACT_APP_BASE_URL=localhost -REDIRECT_URI=http://localhost/api/auth/login +BASE_URL=localhost:8080 +REACT_APP_BASE_URL=localhost:8080 +REDIRECT_URI=http://localhost:8080/api/auth/login #postgres var # POSTGRES_HOST=127.0.0.1 # DB_TYPE=postgres POSTGRES_HOST=postgresql POSTGRES_USER=postgres -POSTGRES_PASSWORD=pass +POSTGRES_PASSWORD=postgres POSTGRES_DATABASE=postgres MODE=DEV diff --git a/conf/init.sql b/conf/init.sql index 468babfc..91175420 100644 --- a/conf/init.sql +++ b/conf/init.sql @@ -1 +1 @@ -ALTER USER postgres WITH PASSWORD 'pass'; \ No newline at end of file +ALTER USER postgres WITH PASSWORD 'postgres'; \ No newline at end of file diff --git a/conf/nginx.conf b/conf/nginx.conf index 8af41775..b3bdd0df 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -3,14 +3,14 @@ server { # listen 80 ssl; # listen 443 ssl; # listen ${NGINX_PORT}; - listen 80; + listen 8080; location /{ proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; - proxy_pass http://react_app:8080; + proxy_pass http://react_app:8081; } location /api { diff --git a/containers/api/src/config/config.service.ts b/containers/api/src/config/config.service.ts index efb443aa..3bde107e 100644 --- a/containers/api/src/config/config.service.ts +++ b/containers/api/src/config/config.service.ts @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* config.service.ts :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: apommier +#+ +:+ +#+ */ +/* By: sadjigui +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/09 14:53:49 by apommier #+# #+# */ -/* Updated: 2023/06/12 14:51:44 by apommier ### ########.fr */ +/* Updated: 2023/06/22 21:19:44 by sadjigui ### ########.fr */ /* */ /* ************************************************************************** */ @@ -17,7 +17,7 @@ export const getTypeOrmConfig = (): TypeOrmModuleOptions => ({ host: process.env.POSTGRES_HOST || 'postgresql', port: parseInt(process.env.POSTGRES_PORT, 10) || 5432, username: process.env.POSTGRES_USER || 'postgres', - password: process.env.POSTGRES_PASSWORD || 'pass', + password: process.env.POSTGRES_PASSWORD || 'postgres', database: process.env.POSTGRES_DATABASE || 'postgres', entities: ["dist/**/*.entity.js"], // entities: [join(__dirname, '**', '*.entity.{ts,js}')] diff --git a/containers/react/.env b/containers/react/.env index 35542322..d7d79fd5 100644 --- a/containers/react/.env +++ b/containers/react/.env @@ -1,4 +1,4 @@ -REACT_APP_BASE_URL=localhost +REACT_APP_BASE_URL=localhost:8080 REACT_APP_API_SECRET=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 REACT_APP_CLIENT_UID=u-s4t2ud-6d29dfa49ba7146577ffd8bf595ae8d9e5aaa3e0a9615df18777171ebf836a41 # REACT_APP_BASE_URL=92.143.191.152 diff --git a/containers/react/package.json b/containers/react/package.json index f0205289..46c0fdf3 100644 --- a/containers/react/package.json +++ b/containers/react/package.json @@ -22,7 +22,7 @@ "web-vitals": "^2.1.4" }, "scripts": { - "start": "HOST=0.0.0.0 PORT=8080 react-scripts start", + "start": "HOST=0.0.0.0 PORT=8081 react-scripts start", "start:dev": "npm run start --watch", "build": "react-scripts build", "test": "react-scripts test", diff --git a/docker-compose.yml b/docker-compose.yml index 04b613cb..0388b159 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ services: # command: sh -c "envsubst < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'" ports: - - 80:80 + - 8080:8080 volumes: - ./conf/nginx.conf:/etc/nginx/conf.d/default.conf # volumes: @@ -34,7 +34,7 @@ services: # depends_on: # - nginx ports: - - 8080:8080 + - 8081:8081 volumes: - ./containers/react:/app # - ./containers/react:/app