testdrivenio/django-on-docker

Volumes attached, but no tables in hello_django_dev DB

d8aninja opened this issue · 1 comments

Following the post and using the repo's code, everything goes as expected until doing

docker-compose exec db psql --username=hello_django --dbname=hello_django_dev

There are none of the tables indicated by the walk-through:

hello_django_dev=# \dt
Did not find any relations.

Though the volume seems attached:

c:\...git\django-on-docker> docker volume inspect django-on-docker_postgres_data
[
    {
        "CreatedAt": "2021-11-01T03:04:36Z",
        "Driver": "local",
        "Labels": {
            "com.docker.compose.project": "django-on-docker",
            "com.docker.compose.version": "1.29.2",
            "com.docker.compose.volume": "postgres_data"
        },
        "Mountpoint": "/var/lib/docker/volumes/django-on-docker_postgres_data/_data",
        "Name": "django-on-docker_postgres_data",
        "Options": null,
        "Scope": "local"
    }
]

Docker version 20.10.8, build 3967b7d

Any thoughts?

Did you apply the migrations?