diff --git a/docker-compose.yaml b/docker-compose.yaml index 1bafff7..f00117f 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -9,12 +9,16 @@ services: - backend command: python app.py # command to start up the front-end once the container is up and running - + mongodb: + image: mongodb/mongodb-community-server:6.0-ubi8 + environment: + - MONGO_INITDB_ROOT_USERNAME=user + - MONGO_INITDB_ROOT_PASSWORD=pass + volumes: + - type: bind + source: ./data + target: /data/db backend: - build: - ports: - - - depends_on: - - db - command: python machine_learning_client.py + build: ./machine-learning-client + diff --git a/machine-learning-client/Dockerfile b/machine-learning-client/Dockerfile index ce38353..b5bd2a7 100644 --- a/machine-learning-client/Dockerfile +++ b/machine-learning-client/Dockerfile @@ -18,4 +18,4 @@ COPY . . RUN pip install -r requirements.txt -CMD ["python"] +CMD ["python", "machine_learning_client.py"] diff --git a/web-app/Dockerfile b/web-app/Dockerfile new file mode 100644 index 0000000..877e9fa --- /dev/null +++ b/web-app/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3.11 +WORKDIR /app +ADD . /app + +RUN pip install --trusted-host pypi.python.org -r requirements.txt + +EXPOSE 80 + +# Define an environment variable... this will be available to programs running inside the container +ENV NAME World +# Run app.py when the container launches +CMD ["python", "app.py"] \ No newline at end of file