🏗️」 wip: started fixing shit

This commit is contained in:
2025-10-24 15:07:33 +02:00
parent 71189c8dc2
commit 3a7033e554
12 changed files with 60 additions and 42 deletions

View File

@ -16,6 +16,9 @@ services:
- LOG_FILE_PATH=/var/log/log.log
- JWT_SECRET=${JWT_SECRET}
- CORS_ORIGIN=${CORS_ORIGIN}
- USER_URL=${USER_URL}
- AUTH_URL=${AUTH_URL}
- SCORE_URL=${SCORE_URL}
restart: unless-stopped
auth-api:
container_name: transcendence-api-auth
@ -30,13 +33,17 @@ services:
- back
environment:
- TZ=Europe/Paris
- GOOGLE_CALLBACK_URL=${AUTH_URL}
- GOOGLE_CALLBACK_URL=${GOOGLE_CALLBACK_URL}
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
- CALLBACK_REDIR=${CALLBACK_REDIR}
- API_TARGET=auth
- LOG_FILE_PATH=/var/log/log.log
- JWT_SECRET=${JWT_SECRET}
- CORS_ORIGIN=${CORS_ORIGIN}
- USER_URL=${USER_URL}
- AUTH_URL=${AUTH_URL}
- SCORE_URL=${SCORE_URL}
restart: unless-stopped
scorestore-api:
container_name: transcendence-api-scoreStore
@ -47,7 +54,6 @@ services:
- db-scoreStore:/db
- log-scoreStore:/var/log
networks:
- front
- back
environment:
- TZ=Europe/Paris
@ -56,4 +62,7 @@ services:
- AVAX_PRIVATE_KEY=${AVAX_PRIVATE_KEY}
- AVAX_RPC_URL=${AVAX_RPC_URL}
- AVAX_CONTRACT_ADDR=${AVAX_CONTRACT_ADDR}
- USER_URL=${USER_URL}
- AUTH_URL=${AUTH_URL}
- SCORE_URL=${SCORE_URL}
restart: unless-stopped

View File

@ -3,8 +3,8 @@ name: ft_transcendence
include:
- ./volumes.yml
- ./networks.yml
- ./monitoring/compose.yml
# - ./monitoring/compose.yml
- ./api-base/compose.yml
- ./front/compose.yml
- ./proxy/compose.yml
- ./ELK/compose.yml
# - ./ELK/compose.yml

View File

@ -1,17 +1,17 @@
FROM node:lts-alpine AS builder
RUN npm install -g pnpm
WORKDIR /app
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
RUN pnpm install --frozen-lockfile
COPY vite.config.js tailwind.config.js ./
COPY src ./src
RUN pnpm vite build
# FROM node:lts-alpine AS builder
#
# RUN npm install -g pnpm
#
# WORKDIR /app
#
# COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
#
# RUN pnpm install --frozen-lockfile
#
# COPY vite.config.js tailwind.config.js ./
# COPY src ./src
#
# RUN pnpm vite build
FROM owasp/modsecurity-crs:nginx-alpine
@ -23,7 +23,7 @@ COPY docker/proxy/config/default.conf.template \
COPY --chmod=755 docker/proxy/entry/ssl-cert.sh /docker-entrypoint.d/ssl-cert.sh
COPY --from=builder /app/dist /usr/share/nginx/html
# COPY --from=builder /app/dist /usr/share/nginx/html
USER root
RUN mkdir -p /var/log/front

View File

@ -19,11 +19,19 @@ server {
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
location / {
proxy_pass http://transcendence-webserv:80/;
proxy_pass http://transcendence-webserv:80;
proxy_http_version 1.1;
proxy_redirect off;
rewrite ^ / break;
}
location /assets/ {
proxy_pass http://transcendence-webserv:80/assets/;
proxy_http_version 1.1;
}
location /api/v1/user/ {
modsecurity off;
proxy_pass http://transcendence-api-user:3000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
@ -35,6 +43,7 @@ server {
}
location /api/v1/auth/ {
modsecurity off;
proxy_pass http://transcendence-api-auth:3000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;