File size: 712 Bytes
a5a756d 7efa840 a5a756d 7efa840 a5a756d 7efa840 a5a756d 3b107ee a5a756d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | 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"] |