Docker compose and coolify solved
This commit is contained in:
18
.cursor/debug.log
Normal file
18
.cursor/debug.log
Normal file
@@ -0,0 +1,18 @@
|
||||
{"location":"orders-crud.js:row.onclick","message":"Row clicked","data":{"datasetOrderId":"40923"},"timestamp":1770234345333,"sessionId":"debug-session","hypothesisId":"A"}
|
||||
{"location":"orders-crud.js:selectOrder","message":"selectOrder called","data":{"orderId":"40923","updateUrl":true},"timestamp":1770234345334,"sessionId":"debug-session","hypothesisId":"D"}
|
||||
{"location":"orders-crud.js:typeCheck","message":"Type comparison","data":{"orderIdType":"number","orderId":40923,"firstOrderIdType":"string","firstOrderId":"40928","strictEqual":false,"looseEqual":false},"timestamp":1770234345334,"sessionId":"debug-session","hypothesisId":"C2"}
|
||||
{"location":"orders-crud.js:findOrder","message":"Order lookup","data":{"orderId":40923,"found":true,"ordersCount":50},"timestamp":1770234345334,"sessionId":"debug-session","hypothesisId":"C"}
|
||||
{"location":"orders-crud.js:parseInt","message":"Parsed orderId","data":{"orderId":40923,"isNaN":false},"timestamp":1770234345334,"sessionId":"debug-session","hypothesisId":"B"}
|
||||
{"location":"orders-crud.js:renderDetail","message":"renderDetail called","data":{"hasContainer":true,"hasSelectedOrder":true,"selectedOrderId":"40923"},"timestamp":1770234345341,"sessionId":"debug-session","hypothesisId":"E"}
|
||||
{"location":"orders-crud.js:row.onclick","message":"Row clicked","data":{"datasetOrderId":"40925"},"timestamp":1770234346128,"sessionId":"debug-session","hypothesisId":"A"}
|
||||
{"location":"orders-crud.js:parseInt","message":"Parsed orderId","data":{"orderId":40925,"isNaN":false},"timestamp":1770234346129,"sessionId":"debug-session","hypothesisId":"B"}
|
||||
{"location":"orders-crud.js:typeCheck","message":"Type comparison","data":{"orderIdType":"number","orderId":40925,"firstOrderIdType":"string","firstOrderId":"40928","strictEqual":false,"looseEqual":false},"timestamp":1770234346129,"sessionId":"debug-session","hypothesisId":"C2"}
|
||||
{"location":"orders-crud.js:findOrder","message":"Order lookup","data":{"orderId":40925,"found":true,"ordersCount":50},"timestamp":1770234346129,"sessionId":"debug-session","hypothesisId":"C"}
|
||||
{"location":"orders-crud.js:selectOrder","message":"selectOrder called","data":{"orderId":"40925","updateUrl":true},"timestamp":1770234346129,"sessionId":"debug-session","hypothesisId":"D"}
|
||||
{"location":"orders-crud.js:renderDetail","message":"renderDetail called","data":{"hasContainer":true,"hasSelectedOrder":true,"selectedOrderId":"40925"},"timestamp":1770234346135,"sessionId":"debug-session","hypothesisId":"E"}
|
||||
{"location":"orders-crud.js:row.onclick","message":"Row clicked","data":{"datasetOrderId":"40921"},"timestamp":1770234346848,"sessionId":"debug-session","hypothesisId":"A"}
|
||||
{"location":"orders-crud.js:typeCheck","message":"Type comparison","data":{"orderIdType":"number","orderId":40921,"firstOrderIdType":"string","firstOrderId":"40928","strictEqual":false,"looseEqual":false},"timestamp":1770234346849,"sessionId":"debug-session","hypothesisId":"C2"}
|
||||
{"location":"orders-crud.js:findOrder","message":"Order lookup","data":{"orderId":40921,"found":true,"ordersCount":50},"timestamp":1770234346849,"sessionId":"debug-session","hypothesisId":"C"}
|
||||
{"location":"orders-crud.js:selectOrder","message":"selectOrder called","data":{"orderId":"40921","updateUrl":true},"timestamp":1770234346849,"sessionId":"debug-session","hypothesisId":"D"}
|
||||
{"location":"orders-crud.js:parseInt","message":"Parsed orderId","data":{"orderId":40921,"isNaN":false},"timestamp":1770234346849,"sessionId":"debug-session","hypothesisId":"B"}
|
||||
{"location":"orders-crud.js:renderDetail","message":"renderDetail called","data":{"hasContainer":true,"hasSelectedOrder":true,"selectedOrderId":"40921"},"timestamp":1770234346855,"sessionId":"debug-session","hypothesisId":"E"}
|
||||
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
FROM node:20-alpine
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Copiar archivos de dependencias
|
||||
COPY package*.json ./
|
||||
|
||||
# Instalar dependencias de producción
|
||||
RUN npm ci --only=production
|
||||
|
||||
# Copiar código fuente
|
||||
COPY . .
|
||||
|
||||
# Puerto de la aplicación
|
||||
EXPOSE 3000
|
||||
|
||||
# Comando de inicio
|
||||
CMD ["npm", "start"]
|
||||
@@ -9,3 +9,7 @@ services:
|
||||
- .env
|
||||
environment:
|
||||
- NODE_ENV=development
|
||||
command: sh -c "npm install && npm run dev"
|
||||
volumes:
|
||||
- .:/usr/src/app
|
||||
- /usr/src/app/node_modules
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
services:
|
||||
app:
|
||||
image: node:20-alpine
|
||||
build: .
|
||||
working_dir: /usr/src/app
|
||||
command: sh -c "npm install && npm run dev"
|
||||
expose:
|
||||
- "3000"
|
||||
environment:
|
||||
@@ -10,9 +9,6 @@ services:
|
||||
- PORT=3000
|
||||
- DATABASE_URL=postgres://${POSTGRES_USER:-botino}:${POSTGRES_PASSWORD:-botino}@db:5432/${POSTGRES_DB:-botino}
|
||||
- REDIS_URL=redis://redis:6379
|
||||
volumes:
|
||||
- .:/usr/src/app
|
||||
- /usr/src/app/node_modules
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
@@ -33,7 +29,11 @@ services:
|
||||
volumes:
|
||||
- db_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-botino} -d ${POSTGRES_DB:-botino}"]
|
||||
test:
|
||||
[
|
||||
"CMD-SHELL",
|
||||
"pg_isready -U ${POSTGRES_USER:-botino} -d ${POSTGRES_DB:-botino}",
|
||||
]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
Reference in New Issue
Block a user