setup script

This commit is contained in:
salvacybersec
2025-11-11 04:36:35 +03:00
parent f0b61735cc
commit 05bb2fc55c
6 changed files with 438 additions and 15 deletions

View File

@@ -32,6 +32,10 @@ COPY --from=builder /app/node_modules ./node_modules
# Copy application code
COPY --chown=oltalama:oltalama . .
# Copy entrypoint script
COPY --chown=oltalama:oltalama docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
# Create necessary directories
RUN mkdir -p database logs && \
chown -R oltalama:oltalama /app
@@ -46,8 +50,8 @@ EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD node -e "require('http').get('http://localhost:3000/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"
# Use tini as entrypoint for proper signal handling
ENTRYPOINT ["/sbin/tini", "--"]
# Use tini and custom entrypoint for proper signal handling and auto-config
ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/docker-entrypoint.sh"]
# Start application
CMD ["node", "src/app.js"]