This commit is contained in:
Elisee ADJIGUIDI 2023-06-23 15:38:58 +02:00
parent f04ea25574
commit 0d42eda749
7 changed files with 14 additions and 14 deletions

8
.env
View File

@ -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

View File

@ -1 +1 @@
ALTER USER postgres WITH PASSWORD 'pass';
ALTER USER postgres WITH PASSWORD 'postgres';

View File

@ -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 {

View File

@ -3,10 +3,10 @@
/* ::: :::::::: */
/* config.service.ts :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */
/* By: sadjigui <sadjigui@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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}')]

View File

@ -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

View File

@ -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",

View File

@ -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