feat: add EURUSD.csv data loading on Docker startup
This commit is contained in:
parent
011bea2350
commit
6522f501b6
3 changed files with 132 additions and 1 deletions
11
Dockerfile
11
Dockerfile
|
|
@ -31,8 +31,17 @@ COPY --from=builder --chown=nextjs:nodejs /app/node_modules ./node_modules
|
|||
# Copy drizzle migrations
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/drizzle ./drizzle
|
||||
|
||||
# Copy data loading scripts
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/scripts ./scripts
|
||||
|
||||
# Copy initial data CSV
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/EURUSD.csv ./EURUSD.csv
|
||||
|
||||
RUN mkdir -p /app/public /app/data && chown -R nextjs:nodejs /app/public /app/data
|
||||
|
||||
# Make startup script executable
|
||||
RUN chmod +x /app/scripts/startup.sh
|
||||
|
||||
ENV NODE_ENV=production PORT=3000 HOSTNAME=0.0.0.0
|
||||
|
||||
USER nextjs
|
||||
|
|
@ -41,4 +50,4 @@ EXPOSE 3000
|
|||
|
||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 CMD wget --no-verbose --tries=1 --spider http://localhost:3000/api/health || exit 1
|
||||
|
||||
CMD ["node", "server.js"]
|
||||
CMD ["/app/scripts/startup.sh"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue