Skip to content

Commit

Permalink
Merge pull request #19 from software-students-fall2023/rqF
Browse files Browse the repository at this point in the history
setup webapp dockerfile
  • Loading branch information
KeiOshima authored Nov 29, 2023
2 parents 72f3a4f + 6b6a074 commit 5a0af37
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
18 changes: 11 additions & 7 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

2 changes: 1 addition & 1 deletion machine-learning-client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ COPY . .

RUN pip install -r requirements.txt

CMD ["python"]
CMD ["python", "machine_learning_client.py"]
12 changes: 12 additions & 0 deletions web-app/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit 5a0af37

Please sign in to comment.