Merge pull request #2 from OlaketalAmigo/hexplor_branch

Hexplor branch
frontend fonctionnel ajouté au projet
This commit is contained in:
H3XploR
2026-01-09 14:25:50 +01:00
committed by GitHub
4 changed files with 33 additions and 19 deletions
+12 -16
View File
@@ -22,8 +22,8 @@ services:
backend: backend:
container_name: backend container_name: backend
build: ./srcs/backend build: ./srcs/backend
ports: expose:
- "3001:3001" - "3001"
depends_on: depends_on:
- database - database
# volumes: # volumes:
@@ -34,17 +34,13 @@ services:
- transcendence - transcendence
restart: always restart: always
# frontend: frontend:
# container_name: frontend container_name: frontend
# build: ./docker/frontend build: ./srcs/frontend/
# ports: ports:
# - "3000:3000" - "8080:80"
# depends_on: depends_on:
# - backend - backend
# volumes: networks:
# // - transcendence
# env_file: restart: always
# //
# networks:
# - transcendence
# restart: always
+1 -1
View File
@@ -76,7 +76,7 @@ async function startServer()
await createTables(); await createTables();
app.get('/', (req, res) => res.send('Backend running')); app.get('/api/', (req, res) => res.send('Backend running'));
app.listen(3001, () => app.listen(3001, () =>
{ {
+2 -2
View File
@@ -1,5 +1,5 @@
FROM nginx:20-alpine FROM nginx:alpine
COPY src /usr/share/nginx/html COPY src /usr/share/nginx/html
COPY nginx.conf /etc/nginx/nginx.conf COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80 EXPOSE 80
CMD ["nginx", "-g", "daemon off;"] CMD ["nginx", "-g", "daemon off;"]
+18
View File
@@ -0,0 +1,18 @@
server {
listen 80;
root /usr/share/nginx/html;
index index.html;
# Frontend
location / {
try_files $uri /index.html;
}
# Backend API
location /api/ {
proxy_pass http://backend:3001/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}