feature(microservice rpc docker):

This commit is contained in:
Devoalda 2023-10-30 08:06:43 +08:00
parent 6e2eea3337
commit 9601cb9f30
2 changed files with 30 additions and 5 deletions

View File

@ -46,8 +46,19 @@ services:
- REACT_APP_API_URL=http://localhost:8000/api
networks:
- dbnet
safeshare-virus:
build:
context: ./safeshare_vdb
dockerfile: Dockerfile
restart:
always
ports:
- "50051:50051"
networks:
- dbnet
volumes:
redis_data:
networks:
dbnet:

View File

@ -0,0 +1,14 @@
FROM python:3.11
LABEL authors="junwei"
# Copy the current directory contents into the container at /app
COPY . /app
# Set the working directory to /app
WORKDIR /app
# Install any needed packages for grpc and environ
RUN pip install grpcio grpcio-tools django-environ
# Start Server at server.py
CMD ["python", "server.py"]