Sistemate un paio di configurazioni, dovremmo essere pronti a programmare

This commit is contained in:
Jag 2025-10-22 00:36:06 +02:00
parent 80fc103e03
commit 02e7c3c7af
4 changed files with 7 additions and 6 deletions

2
backend/index.php Normal file
View File

@ -0,0 +1,2 @@
<?php
echo "CIAOOO";

View File

@ -2,11 +2,11 @@ services:
frontend: frontend:
build: ./frontend build: ./frontend
ports: ports:
- "3000:3000" # React dev server - "5173:5173" # React dev server
working_dir: /app working_dir: /app
volumes: volumes:
- ./frontend:/app - ./frontend:/app
- /app/node_modules # Avoid host/node_modules conflicts - /app/node_modules
command: npm run dev command: npm run dev
depends_on: depends_on:
- backend - backend

View File

@ -1,4 +1,4 @@
FROM node:18 FROM node:21
LABEL authors="Sergio Bianchi" LABEL authors="Sergio Bianchi"
WORKDIR /app WORKDIR /app
@ -8,5 +8,4 @@ RUN npm install
COPY . . COPY . .
EXPOSE 3000 EXPOSE 5173
CMD ["npm", "run", "dev"]

View File

@ -4,7 +4,7 @@
"version": "0.0.0", "version": "0.0.0",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite --host 0.0.0.0",
"build": "tsc -b && vite build", "build": "tsc -b && vite build",
"lint": "eslint .", "lint": "eslint .",
"preview": "vite preview" "preview": "vite preview"