Setting up the repo with correct dockerfiles and docker-copmose files, and deleting .idea from git
This commit is contained in:
2
hub/.gitignore
vendored
2
hub/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
venv
|
||||
__pycache__
|
||||
@@ -3,9 +3,10 @@ FROM python:3.9-slim
|
||||
# Set the working directory inside the container
|
||||
WORKDIR /app
|
||||
# Copy the requirements.txt file and install dependencies
|
||||
COPY requirements.txt .
|
||||
COPY hub/requirements.txt .
|
||||
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
# Copy the entire application into the container
|
||||
COPY . .
|
||||
COPY hub/. .
|
||||
# Run the main.py script inside the container when it starts
|
||||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0"]
|
||||
@@ -1,4 +1,3 @@
|
||||
version: "3.9"
|
||||
name: "road_vision__hub"
|
||||
services:
|
||||
mqtt:
|
||||
@@ -16,7 +15,7 @@ services:
|
||||
|
||||
|
||||
postgres_db:
|
||||
image: postgres:latest
|
||||
image: postgres:17
|
||||
container_name: postgres_db
|
||||
restart: always
|
||||
environment:
|
||||
@@ -49,7 +48,9 @@ services:
|
||||
|
||||
store:
|
||||
container_name: store
|
||||
build: ../../store
|
||||
build:
|
||||
context: ../../
|
||||
dockerfile: store/Dockerfile
|
||||
depends_on:
|
||||
- postgres_db
|
||||
restart: always
|
||||
@@ -77,7 +78,9 @@ services:
|
||||
|
||||
hub:
|
||||
container_name: hub
|
||||
build: ../
|
||||
build:
|
||||
context: ../../
|
||||
dockerfile: hub/Dockerfile
|
||||
depends_on:
|
||||
- mqtt
|
||||
- redis
|
||||
|
||||
Reference in New Issue
Block a user