File size: 1,021 Bytes
adb8518
 
 
 
 
 
 
 
 
 
 
cc383a1
88290d5
 
 
cc383a1
 
88290d5
 
cc383a1
 
88290d5
cc383a1
 
b7a1008
cc383a1
adb8518
bd6c187
a14d3b9
f76d506
a14d3b9
 
383682c
12ff1f8
adb8518
 
 
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
29
30
31
32
33
34
35
36
37
38
# Stage 1: Use Alpine to install required tools
FROM alpine:latest AS builder
RUN apk add --no-cache curl jq

# Stage 2: Use the original image
FROM reddravenn/stremio-tmdb-dice:latest

# Copy required binaries from Alpine stage
COPY --from=builder /usr/bin/curl /usr/bin/curl
COPY --from=builder /usr/bin/jq /usr/bin/jq

# Create necessary directories with proper permissions
RUN mkdir -p /usr/src/app/log /usr/src/app/cache /usr/src/app/public && \
    chmod -R 755 /usr/src/app && \
    chown -R node:node /usr/src/app

# Ensure necessary files and directories have correct permissions
RUN chmod -R 755 /usr/src/app && \
    chown -R node:node /usr/src/app

# Set user to node for better security
USER node

# Expose the port the application runs on
EXPOSE 7000

# Set environment variables
# BASE_URL=http://localhost:7000
# CATALOG_CONTENT_CACHE_DURATION=3d
# RPDB_POSTER_CACHE_DURATION=3d
# LOG_INTERVAL_DELETION=3d
# LOG_LEVEL=info
# NODE_ENV=production
# PORT=7000

# Run the application
CMD ["node", "index.js"]