I've looked through different solutions and currently I'm unable to find a solution. For context, I'm building a website using the Wagtail CMS for Django and I'm trying to use Docker. I built the project using:
wagtail start sevendays
then created a docker-compose.yml file with this code:
version: "3.9"
services:
db:
image: postgres
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
web:
build: .
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- "8000:8000"
depends_on:
- db
I also changed the settings.py to the proper PostgreSQL configurations. Running docker-compose up gives me ModuleNotFoundError: No module named 'psycopg2'.
I also want to note that doing pip install psycopg2 and pip install psycopg2-binary did not work, it'd give me requirements satisfied message. Using pip3 doesn't work either and I am not in a venv.