revert: restore original Dockerfiles
This commit is contained in:
parent
d68ee398ab
commit
34e22d3c7f
|
|
@ -37,7 +37,7 @@ RUN DATABASE_URL="postgresql://user:pass@localhost:5432/db" npx prisma generate
|
||||||
|
|
||||||
COPY --chown=nestjs:nodejs --from=builder /app/dist ./dist
|
COPY --chown=nestjs:nodejs --from=builder /app/dist ./dist
|
||||||
|
|
||||||
RUN printf '#!/bin/sh\nset -e\necho "Running database migrations..."\nnpx prisma migrate deploy\necho "Cleaning up incorrect TEAM_BONUS records..."\nnpx prisma db execute --stdin <<EOF\nDELETE FROM contribution_records WHERE source_type = '"'"'TEAM_BONUS'"'"' AND account_sequence != source_account_sequence;\nEOF\necho "Starting application..."\nexec 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 NODE_ENV=production
|
||||||
ENV TZ=Asia/Shanghai
|
ENV TZ=Asia/Shanghai
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ RUN DATABASE_URL="postgresql://user:pass@localhost:5432/db" npx prisma generate
|
||||||
COPY --chown=nestjs:nodejs --from=builder /app/dist ./dist
|
COPY --chown=nestjs:nodejs --from=builder /app/dist ./dist
|
||||||
|
|
||||||
# 创建启动脚本
|
# 创建启动脚本
|
||||||
RUN printf '#!/bin/sh\nset -e\necho "Running database migrations..."\nnpx prisma migrate deploy\necho "Cleaning up incorrect TEAM_BONUS records..."\nnpx prisma db execute --stdin <<EOF\nDELETE FROM synced_contribution_records WHERE source_type = '"'"'TEAM_BONUS'"'"' AND account_sequence != source_account_sequence;\nEOF\necho "Starting application..."\nexec 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 NODE_ENV=production
|
||||||
ENV TZ=Asia/Shanghai
|
ENV TZ=Asia/Shanghai
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue