FROM node:18-alpine # Create app directory WORKDIR /app # Clone the repository RUN apk add --no-cache git && \ git clone https://github.com/Inside4ndroid/TMDB-Embed-API.git . && \ cp .env_example .env ARG PORT=7860 # Configure .env file with the provided TMDB API key RUN sed -i 's/TMDB_API_KEY="YOUR_TMDB_API_KEY_HERE"/TMDB_API_KEY="4ef0d7355d9ffb5151e987764708ce96"/' .env && \ sed -i "s/PORT=.*/PORT=$PORT/" .env # Install dependencies RUN npm install # Expose the default port (3000) EXPOSE $PORT # 设置健康检查 HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \ CMD curl -f http://localhost:7860 || exit 1 # Start the application CMD ["npm", "run", "start"]