Compare commits

...

5 Commits

4 changed files with 13 additions and 13 deletions

View File

@@ -61,3 +61,4 @@ ENV DATABASE_URL="file:/app/data/dev.db"
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD ["node", "server.js"] CMD ["node", "server.js"]

4
Jenkinsfile vendored
View File

@@ -90,8 +90,8 @@ services:
- ./data:/app/data - ./data:/app/data
networks: networks:
- homelab-net - homelab-net
mem_limit: 32m mem_limit: 512m
mem_reservation: 16m mem_reservation: 256m
restart: unless-stopped restart: unless-stopped
networks: networks:
homelab-net: homelab-net:

View File

@@ -248,3 +248,7 @@ src/
└── types/ └── types/
└── note.ts └── note.ts
``` ```
nueva prueba

View File

@@ -9,20 +9,15 @@ echo "Checking database..."
mkdir -p /app/data mkdir -p /app/data
chmod 777 /app/data chmod 777 /app/data
# Create a dummy file to test write access # Run db push (creates/updates database schema)
touch /app/data/.write_test 2>/dev/null && rm /app/data/.write_test || { # If it fails due to OOM but DB exists, continue anyway
echo "Warning: Cannot write to /app/data, trying to fix permissions..."
chmod -R 777 /app/data
}
# Use local prisma version from node_modules (skip generate - already built)
./node_modules/prisma/build/index.js db push --skip-generate || { ./node_modules/prisma/build/index.js db push --skip-generate || {
echo "Warning: db push failed, checking if database exists..." exit_code=$?
if [ -f /app/data/dev.db ]; then if [ -f /app/data/dev.db ]; then
echo "Database file exists, continuing..." echo "db push failed (code $exit_code) but database exists, continuing..."
else else
echo "Database file does not exist and could not be created" echo "db push failed and database does not exist"
exit 1 exit $exit_code
fi fi
} }