docker fixes

This commit is contained in:
slawk0
2024-11-17 00:06:55 +01:00
parent a118ad38f4
commit 2b11874540
4 changed files with 8 additions and 7 deletions

View File

@@ -11,9 +11,8 @@ services:
PG_PASSWORD: ${PG_PASSWORD}
PG_DATABASE: ${PG_DATABASE}
PG_HOST: db
PG_PORT: ${PG_PORT}
ports:
- "${SERVER_PORT}:${SERVER_PORT}"
- 3000
depends_on:
db:
condition: service_healthy
@@ -25,9 +24,11 @@ services:
context: ./client
dockerfile: Dockerfile
ports:
- "80:80"
- ${CLIENT_PORT}:80
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
depends_on:
- relay-server
networks:
- relay-network
@@ -42,7 +43,7 @@ services:
POSTGRES_DB: ${PG_DATABASE}
POSTGRES_PASSWORD: ${PG_PASSWORD}
expose:
- "${PG_PORT}"
- 5432
healthcheck:
test: [ "CMD", "pg_isready", "-U", "${PG_USER}" ]
interval: 10s

View File

@@ -9,7 +9,7 @@ server {
}
location /api {
proxy_pass http://relay-server:4000;
proxy_pass http://relay-server:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

View File

@@ -8,7 +8,8 @@
#PG_HOST=192.168.47
#PG_PORT=5433
CLIENT_PORT=80
#DO NOT CHANGE
SERVER_PORT=3000
JWT_SECRET=fdsfsdfds@
ORIGIN=http://localhost:5173

View File

@@ -19,7 +19,6 @@ function verifyJwtToken(token) {
if (!decoded?.user_id) {
throw new Error("Token verification failed - missing user_id");
}
console.log("verifyJwtToken decoded: ", decoded);
const username = filter(decoded.username);
return { username: username, user_id: decoded.user_id };
} catch (e) {