Enhance image upload and background management: Update Docker configuration to create a dedicated backgrounds directory for uploaded images, modify API routes to handle background images specifically, and improve README documentation to reflect these changes. Additionally, refactor components to utilize the new Avatar component for consistent avatar rendering across the application.
Some checks failed
Deploy with Docker Compose / deploy (push) Failing after 33s
Some checks failed
Deploy with Docker Compose / deploy (push) Failing after 33s
This commit is contained in:
@@ -51,13 +51,14 @@ ENV DATABASE_URL="file:/app/data/dev.db"
|
||||
RUN pnpm add prisma @prisma/client @prisma/adapter-better-sqlite3 better-sqlite3 --prod && \
|
||||
pnpm dlx prisma generate
|
||||
|
||||
# Create data directory for SQLite database and uploads directory
|
||||
RUN mkdir -p /app/data /app/public/uploads && chown -R nextjs:nodejs /app/data /app/public/uploads
|
||||
# Create data directory for SQLite database and uploads directories
|
||||
RUN mkdir -p /app/data /app/public/uploads /app/public/uploads/backgrounds && chown -R nextjs:nodejs /app/data /app/public/uploads
|
||||
|
||||
RUN echo '#!/bin/sh' > /app/entrypoint.sh && \
|
||||
echo 'set -e' >> /app/entrypoint.sh && \
|
||||
echo 'mkdir -p /app/data' >> /app/entrypoint.sh && \
|
||||
echo 'mkdir -p /app/public/uploads' >> /app/entrypoint.sh && \
|
||||
echo 'mkdir -p /app/public/uploads/backgrounds' >> /app/entrypoint.sh && \
|
||||
echo 'pnpm dlx prisma migrate deploy || true' >> /app/entrypoint.sh && \
|
||||
echo 'exec node server.js' >> /app/entrypoint.sh && \
|
||||
chmod +x /app/entrypoint.sh && \
|
||||
|
||||
Reference in New Issue
Block a user