Compare commits

..

9 Commits

6 changed files with 24 additions and 8 deletions
+2 -1
View File
@@ -57,7 +57,8 @@ EXPOSE 3000
ENV PORT=3000
ENV HOSTNAME="0.0.0.0"
ENV DATABASE_URL="file:./data/dev.db"
ENV DATABASE_URL="file:/app/data/dev.db"
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD ["node", "server.js"]
Vendored
+3 -3
View File
@@ -85,13 +85,13 @@ services:
- "traefik.http.routers.${NAME_SERVICE}.rule=Host(`recall.vodorod.cl`)"
environment:
- TZ=America/Santiago
- DATABASE_URL=file:./data/dev.db
- DATABASE_URL=file:/app/data/dev.db
volumes:
- ./data:/app/data
networks:
- homelab-net
mem_limit: 32m
mem_reservation: 16m
mem_limit: 512m
mem_reservation: 256m
restart: unless-stopped
networks:
homelab-net:
+4
View File
@@ -248,3 +248,7 @@ src/
└── types/
└── note.ts
```
nueva prueba
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -8,5 +8,5 @@ services:
volumes:
- ./data:/app/data
environment:
- DATABASE_URL=file:./data/dev.db
- DATABASE_URL=file:/app/data/dev.db
restart: unless-stopped
+14 -3
View File
@@ -1,14 +1,25 @@
#!/bin/bash
set -e
# Initialize database if it doesn't exist or schema changed
cd /app
echo "Checking database..."
# Ensure data directory exists with proper permissions
mkdir -p /app/data
chmod 777 /app/data
# Use local prisma version from node_modules (skip generate - already built)
./node_modules/prisma/build/index.js db push --skip-generate
# Run db push (creates/updates database schema)
# If it fails due to OOM but DB exists, continue anyway
./node_modules/prisma/build/index.js db push --skip-generate || {
exit_code=$?
if [ -f /app/data/dev.db ]; then
echo "db push failed (code $exit_code) but database exists, continuing..."
else
echo "db push failed and database does not exist"
exit $exit_code
fi
}
echo "Starting application..."
exec "$@"