feature(microservice rpc docker):
This commit is contained in:
parent
6e2eea3337
commit
70b9919ccb
|
@ -10,14 +10,14 @@ services:
|
||||||
expose:
|
expose:
|
||||||
- 6379
|
- 6379
|
||||||
volumes:
|
volumes:
|
||||||
- redis_data:/data
|
- redis_data:/data
|
||||||
|
|
||||||
safeshare:
|
safeshare:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
restart:
|
restart:
|
||||||
always
|
always
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000" # Map container port 8000 to host port 8000
|
- "8000:8000" # Map container port 8000 to host port 8000
|
||||||
environment:
|
environment:
|
||||||
|
@ -39,15 +39,26 @@ services:
|
||||||
context: ./safeshare-frontend
|
context: ./safeshare-frontend
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
restart:
|
restart:
|
||||||
always
|
always
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000" # Map container port 3000 to host port 3000
|
- "3000:3000" # Map container port 3000 to host port 3000
|
||||||
environment:
|
environment:
|
||||||
- REACT_APP_API_URL=http://localhost:8000/api
|
- REACT_APP_API_URL=http://localhost:8000/api
|
||||||
networks:
|
networks:
|
||||||
- dbnet
|
- dbnet
|
||||||
volumes:
|
|
||||||
redis_data:
|
|
||||||
|
|
||||||
|
safeshare-virus:
|
||||||
|
build:
|
||||||
|
context: ./safeshare_vdb
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
restart:
|
||||||
|
always
|
||||||
|
ports:
|
||||||
|
- "50051:50051"
|
||||||
|
networks:
|
||||||
|
- dbnet
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
redis_data:
|
||||||
networks:
|
networks:
|
||||||
dbnet:
|
dbnet:
|
||||||
|
|
|
@ -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
|
||||||
|
RUN pip install grpcio grpcio-tools
|
||||||
|
|
||||||
|
# Start Server at server.py
|
||||||
|
CMD ["python", "server.py"]
|
Loading…
Reference in New Issue