File size: 812 Bytes
af87e37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4ffd997
 
af87e37
 
 
 
 
 
 
 
 
 
 
 
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
FROM python:3.9

# Create a user with a specified UID to avoid permission issues
RUN useradd -m -u 1000 user

# Set the working directory to the user's home directory
WORKDIR /app

# Install system dependencies (sudo, npm) as root
RUN apt update -y && apt install -y sudo npm

# Copy package.json and package-lock.json to the working directory and set the owner to user

# Set the user for subsequent commands
COPY --chown=user ./index.js index.js
# Install Node.js dependencies
RUN npm i express telegraf axios @sasmeee/igdl


# Copy the rest of the application code to the working directory and set the owner to user
COPY --chown=user . /app

# Ensure the user has write permission to health_data.json


# Expose the port your app runs on
EXPOSE 7860

# Command to run your application
CMD ["node", "index.js"]