smgc commited on
Commit
bed42ee
·
verified ·
1 Parent(s): 8391cb0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -3
Dockerfile CHANGED
@@ -1,11 +1,26 @@
1
- FROM node:20-alpine
2
 
3
  WORKDIR /app
4
 
 
 
 
 
5
  COPY . .
6
 
7
- RUN npm install
 
 
 
 
 
 
 
 
 
 
 
8
 
9
  EXPOSE 8787
10
 
11
- CMD ["node", "api/index.js"]
 
1
+ FROM python:3.9-slim
2
 
3
  WORKDIR /app
4
 
5
+ RUN apt-get update && apt-get install -y \
6
+ build-essential \
7
+ && rm -rf /var/lib/apt/lists/*
8
+
9
  COPY . .
10
 
11
+ RUN pip install --no-cache-dir fastapi uvicorn python-dotenv grpcio grpcio-tools protobuf pydantic python-multipart
12
+
13
+ RUN python -m grpc_tools.protoc \
14
+ -I./protos \
15
+ --python_out=. \
16
+ --grpc_python_out=. \
17
+ ./protos/*.proto
18
+
19
+ ENV PORT=8787
20
+ ENV API_PREFIX=/
21
+ ENV MAX_RETRY_COUNT=3
22
+ ENV RETRY_DELAY=5000
23
 
24
  EXPOSE 8787
25
 
26
+ CMD ["python", "app.py"]