This is the DockerFile
FROM python:3.10.1
ENV APP_ROOT /app
ENV CONFIG_ROOT /config
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
RUN mkdir ${CONFIG_ROOT}
COPY requirements.txt ${CONFIG_ROOT}/requirements.txt
COPY firebase.json ${CONFIG_ROOT}/firebase.json
RUN pip install -r ${CONFIG_ROOT}/requirements.txt
RUN python -m spacy download en_core_web_sm
RUN mkdir ${APP_ROOT}
WORKDIR ${APP_ROOT}
ADD . ${APP_ROOT}
And below is the docker-compose.yml
file:
version: "3.7"
services:
postgres:
container_name: postgres_container
image: postgres:14.6
environment:
POSTGRES_USER: xyz
POSTGRES_PASSWORD: xyz
POSTGRES_DB: xyz
PGDATA: /data/postgres
volumes:
- ./dev-volume/postgres:/data/postgres
ports:
- "5432:5432"
networks:
- postgres
restart: unless-stopped
web:
build: .
container_name: web
restart: always
env_file:
- .env.dev
ports:
- "8000:8000"
volumes:
- ./dev-volume/static/:/app/static
- ./dev-volume/media/:/app/media
- ./dev-volume/db:/db
entrypoint: /app/wsgi-entrypoint.sh
command:
"gunicorn --workers=2 --bind=0.0.0.0:8000 picard.wsgi:application"
depends_on:
- postgres
networks:
- postgres
nginx:
image: nginx:latest
container_name: ngx
ports:
- "80:80"
- "443:443"
volumes:
- ./static/:/static
- ./media/:/media
- ./nginx/dev:/etc/nginx/conf.d
depends_on:
- web
networks:
- postgres
networks:
postgres:
driver: bridge
So these are both the files, when I run docker compose up --build
in Linux, it works fine but when I try to do the same in windows I get the error
exec /app/wsgi-entrypoint.sh: no such file or directory
sh file is in the app directory only. But somehow windows is not able to find it. It works fine in Linux but not in windows.
I have tried this solution But it isn't working. And I have tried changing paths but none of them is working.