abhisheksan commited on
Commit
4470f94
·
1 Parent(s): bb2b80e

Update CMD instruction in Dockerfile to use Poetry for running the application and adjust volume mapping in docker-compose.yml

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -1
  2. docker-compose.yml +2 -1
Dockerfile CHANGED
@@ -59,4 +59,4 @@ EXPOSE 8000
59
  # CMD curl -f http://localhost:8000/health || exit 1
60
 
61
  # Run the application
62
- CMD ["/app/.venv/bin/python", "-m", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
 
59
  # CMD curl -f http://localhost:8000/health || exit 1
60
 
61
  # Run the application
62
+ CMD ["poetry", "run", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "${PORT:-8000}"]
docker-compose.yml CHANGED
@@ -8,10 +8,11 @@ services:
8
  environment:
9
  - LOG_LEVEL=INFO
10
  - RELOAD=false
 
11
  env_file:
12
  - .env
13
  volumes:
14
- - ./logs:/app/logs
15
  restart: unless-stopped
16
  healthcheck:
17
  test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
 
8
  environment:
9
  - LOG_LEVEL=INFO
10
  - RELOAD=false
11
+ - DISABLE_FILE_LOGGING=true
12
  env_file:
13
  - .env
14
  volumes:
15
+ - ./logs:/tmp/app-logs
16
  restart: unless-stopped
17
  healthcheck:
18
  test: ["CMD", "curl", "-f", "http://localhost:8000/health"]