Merge pull request 'develop' (#12) from develop into main
All checks were successful
Personal/recall/pipeline/head This commit looks good
All checks were successful
Personal/recall/pipeline/head This commit looks good
Reviewed-on: #12
This commit was merged in pull request #12.
This commit is contained in:
@@ -49,6 +49,8 @@ COPY --from=builder /app/prisma ./prisma
|
|||||||
COPY --from=builder /app/node_modules/.prisma ./node_modules/.prisma
|
COPY --from=builder /app/node_modules/.prisma ./node_modules/.prisma
|
||||||
|
|
||||||
COPY --from=builder /app/prisma/schema.prisma /app/schema.prisma
|
COPY --from=builder /app/prisma/schema.prisma /app/schema.prisma
|
||||||
|
COPY docker-entrypoint.sh /usr/local/bin/
|
||||||
|
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
USER nextjs
|
USER nextjs
|
||||||
|
|
||||||
@@ -58,4 +60,5 @@ ENV PORT=3000
|
|||||||
ENV HOSTNAME="0.0.0.0"
|
ENV HOSTNAME="0.0.0.0"
|
||||||
ENV DATABASE_URL="file:./data/dev.db"
|
ENV DATABASE_URL="file:./data/dev.db"
|
||||||
|
|
||||||
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||||
CMD ["node", "server.js"]
|
CMD ["node", "server.js"]
|
||||||
|
|||||||
14
docker-entrypoint.sh
Normal file
14
docker-entrypoint.sh
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Initialize database if it doesn't exist or schema changed
|
||||||
|
echo "Checking database..."
|
||||||
|
|
||||||
|
# Create data directory if it doesn't exist
|
||||||
|
mkdir -p /app/data
|
||||||
|
|
||||||
|
# Push schema (safe - won't overwrite data, only syncs schema)
|
||||||
|
npx prisma db push --skip-generate --skip-pull
|
||||||
|
|
||||||
|
echo "Starting application..."
|
||||||
|
exec "$@"
|
||||||
Reference in New Issue
Block a user