Hello,
My app is running on Docker on my own server.
Running on local with debug mode enable, I can upload a small csv file ( 125 Ko) and django parse it to save informations in sqlite3 database. But it’s not working on docker wiith Debug mode disabled.
I don’t know what is going wrong and don’t know how to find clues to resolve this incident.
Please someone help me ?
Finding clues - check all the possible log files on the system and for the docker containers.
If you’re looking for more direct assistance, then we’re going to need more details about your setup and application. This (potentially) includes seeing your Dockerfile and (possibly) docker-compose file, along with your settings and the view responsible for processing the uploaded file.
Hello,
thanks for your help.
What log can i read ? Is django sending information in syslog?
here dockerfile
FROM wuuker/python-pandas:python3.10-jammy-20230829
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONFAULTHANDLER 1
ENV PYTHONUNBUFFERED 1
# copy source and install dependencies
RUN pip install --upgrade pip
COPY . /app
WORKDIR /app/
# install dependencies
RUN pip install -r requirements.txt
EXPOSE 8000
# start server
CMD ["gunicorn", "-b", "0.0.0.0:8000", "prj_webapplifinance.wsgi:application"]
here compose.yml
services:
webappfinance:
container_name: webappfinance_v0.37
volumes:
- static:/app/
build: .
command: gunicorn -b 0.0.0.0:8000 prj_webapplifinance.wsgi:application
ports:
- 8000:8000
volumes:
static:
Your docker log (e.g., docker log webappfinance_v0.37
) for that container should have what is written to stdout / stderr. Beyond that, the logs would be from whatever you have your logger configured for.
Yes, I manage my containers by portainer and I already watch logs. There is the version name of my app (because I print it in Index function). No other interesting information.
In the absence of more detailed information, the only suggestion I can make is to increase the logging level in your application and log as much information as you can think of to try and determine what’s going wrong.