fix(2.0-dockerfiles): 使用printf替代echo解决alpine兼容性问题
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
1c3e7809ad
commit
c1de1daea8
|
|
@ -37,12 +37,7 @@ RUN DATABASE_URL="postgresql://user:pass@localhost:5432/db" npx prisma generate
|
|||
|
||||
COPY --chown=nestjs:nodejs --from=builder /app/dist ./dist
|
||||
|
||||
RUN echo '#!/bin/sh\n\
|
||||
set -e\n\
|
||||
echo "Running database migrations..."\n\
|
||||
npx prisma migrate deploy\n\
|
||||
echo "Starting application..."\n\
|
||||
exec node dist/main.js\n' > /app/start.sh && chmod +x /app/start.sh
|
||||
RUN printf '#!/bin/sh\nset -e\necho "Running database migrations..."\nnpx prisma migrate deploy\necho "Starting application..."\nexec node dist/main.js\n' > /app/start.sh && chmod +x /app/start.sh
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV TZ=Asia/Shanghai
|
||||
|
|
|
|||
|
|
@ -37,12 +37,7 @@ RUN DATABASE_URL="postgresql://user:pass@localhost:5432/db" npx prisma generate
|
|||
|
||||
COPY --chown=nestjs:nodejs --from=builder /app/dist ./dist
|
||||
|
||||
RUN echo '#!/bin/sh\n\
|
||||
set -e\n\
|
||||
echo "Running database migrations..."\n\
|
||||
npx prisma migrate deploy\n\
|
||||
echo "Starting application..."\n\
|
||||
exec node dist/main.js\n' > /app/start.sh && chmod +x /app/start.sh
|
||||
RUN printf '#!/bin/sh\nset -e\necho "Running database migrations..."\nnpx prisma migrate deploy\necho "Starting application..."\nexec node dist/main.js\n' > /app/start.sh && chmod +x /app/start.sh
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV TZ=Asia/Shanghai
|
||||
|
|
|
|||
|
|
@ -54,12 +54,7 @@ RUN DATABASE_URL="postgresql://user:pass@localhost:5432/db" npx prisma generate
|
|||
COPY --chown=nestjs:nodejs --from=builder /app/dist ./dist
|
||||
|
||||
# 创建启动脚本
|
||||
RUN echo '#!/bin/sh\n\
|
||||
set -e\n\
|
||||
echo "Running database migrations..."\n\
|
||||
npx prisma migrate deploy\n\
|
||||
echo "Starting application..."\n\
|
||||
exec node dist/main.js\n' > /app/start.sh && chmod +x /app/start.sh
|
||||
RUN printf '#!/bin/sh\nset -e\necho "Running database migrations..."\nnpx prisma migrate deploy\necho "Starting application..."\nexec node dist/main.js\n' > /app/start.sh && chmod +x /app/start.sh
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV TZ=Asia/Shanghai
|
||||
|
|
|
|||
|
|
@ -37,12 +37,7 @@ RUN DATABASE_URL="postgresql://user:pass@localhost:5432/db" npx prisma generate
|
|||
|
||||
COPY --chown=nestjs:nodejs --from=builder /app/dist ./dist
|
||||
|
||||
RUN echo '#!/bin/sh\n\
|
||||
set -e\n\
|
||||
echo "Running database migrations..."\n\
|
||||
npx prisma migrate deploy\n\
|
||||
echo "Starting application..."\n\
|
||||
exec node dist/main.js\n' > /app/start.sh && chmod +x /app/start.sh
|
||||
RUN printf '#!/bin/sh\nset -e\necho "Running database migrations..."\nnpx prisma migrate deploy\necho "Starting application..."\nexec node dist/main.js\n' > /app/start.sh && chmod +x /app/start.sh
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV TZ=Asia/Shanghai
|
||||
|
|
|
|||
|
|
@ -37,12 +37,7 @@ RUN DATABASE_URL="postgresql://user:pass@localhost:5432/db" npx prisma generate
|
|||
|
||||
COPY --chown=nestjs:nodejs --from=builder /app/dist ./dist
|
||||
|
||||
RUN echo '#!/bin/sh\n\
|
||||
set -e\n\
|
||||
echo "Running database migrations..."\n\
|
||||
npx prisma migrate deploy\n\
|
||||
echo "Starting application..."\n\
|
||||
exec node dist/main.js\n' > /app/start.sh && chmod +x /app/start.sh
|
||||
RUN printf '#!/bin/sh\nset -e\necho "Running database migrations..."\nnpx prisma migrate deploy\necho "Starting application..."\nexec node dist/main.js\n' > /app/start.sh && chmod +x /app/start.sh
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV TZ=Asia/Shanghai
|
||||
|
|
|
|||
|
|
@ -37,12 +37,7 @@ RUN DATABASE_URL="postgresql://user:pass@localhost:5432/db" npx prisma generate
|
|||
|
||||
COPY --chown=nestjs:nodejs --from=builder /app/dist ./dist
|
||||
|
||||
RUN echo '#!/bin/sh\n\
|
||||
set -e\n\
|
||||
echo "Running database migrations..."\n\
|
||||
npx prisma migrate deploy\n\
|
||||
echo "Starting application..."\n\
|
||||
exec node dist/main.js\n' > /app/start.sh && chmod +x /app/start.sh
|
||||
RUN printf '#!/bin/sh\nset -e\necho "Running database migrations..."\nnpx prisma migrate deploy\necho "Starting application..."\nexec node dist/main.js\n' > /app/start.sh && chmod +x /app/start.sh
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV TZ=Asia/Shanghai
|
||||
|
|
|
|||
Loading…
Reference in New Issue