Skip to content

Commit

Permalink
docker fix
Browse files Browse the repository at this point in the history
  • Loading branch information
VLADISLAV.BOBKOV committed Dec 7, 2024
1 parent f30c277 commit e729816
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ FROM python:3.9.17-slim
WORKDIR /app
COPY . .
RUN pip install -r requirements.txt

Check failure on line 4 in backend/Dockerfile

View workflow job for this annotation

GitHub Actions / Проверка наличия тега 0.8 и работоспособности docker-compose

DL3042 warning: Avoid use of cache directory with pip. Use `pip install --no-cache-dir <package>`
CMD ["sh", "-c", "python init_db.py && python main.py"]
# CMD ["python", "-u", "app/main.py"]
#CMD ["sh", "-c", "python init_db.py && python main.py"]
CMD ["python", "-u", "app/main.py"]
19 changes: 10 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,27 @@ services:
- MONGO_URI=mongodb://mongo:27017/credit_database
depends_on:
- mongo
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro

frontend:
container_name: frontend
build: ./frontend
ports:
- "127.0.0.1:8080:8080"
- "8080:8080"
networks:
- app_network
depends_on:
- backend

mongo:
image: mongodb/mongodb-community-server:7.0.0-ubi8
# ports:
# - "27017:27017"
volumes:
- mongo_data:/data/db
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
networks:
- app_network

volumes:
mongo_data:
mongo_data:

networks:
app_network:
driver: bridge

0 comments on commit e729816

Please sign in to comment.