That's a shame, I tried following the instructions from the docs for this and at this step I can't get any further as the containers that are being spawned don't have any network:
docker-compose run --rm api python manage.py migrate
After that I get a series of erros because there is no networking:
server root / srv funkwhale docker-compose up -d postgres
Creating network "funkwhale_default" with the default driver
Creating funkwhale_postgres_1 ... done
server root / srv funkwhale docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c2b6ae5e4edf postgres:11 "docker-entrypoint.s…" 6 seconds ago Up 5 seconds 5432/tcp funkwhale_postgres_1
stockbox.omcw.co.uk root / srv funkwhale docker-compose run --rm api python manage.py migrate
Creating funkwhale_redis_1 ... done
Creating funkwhale_api_run ... done
Traceback (most recent call last):
File "/venv/lib/python3.8/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
self.connect()
File "/venv/lib/python3.8/site-packages/django/utils/asyncio.py", line 33, in inner
return func(*args, **kwargs)
File "/venv/lib/python3.8/site-packages/django/db/backends/base/base.py", line 200, in connect
self.connection = self.get_new_connection(conn_params)
File "/venv/lib/python3.8/site-packages/django/utils/asyncio.py", line 33, in inner
return func(*args, **kwargs)
File "/venv/lib/python3.8/site-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection
connection = Database.connect(**conn_params)
File "/venv/lib/python3.8/site-packages/psycopg2/__init__.py", line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: could not connect to server: Host is unreachable
Is the server running on host "postgres" (172.18.0.2) and accepting
TCP/IP connections on port 5432?
And the info around the docker network:
$ docker network inspect 1503332f6253
[
{
"Name": "funkwhale_default",
"Id": "1503332f6253ebf1f48b1d222fed7ca3233ead8e170fa03cc9770ad63641f0ce",
"Created": "2022-10-06T17:25:01.808947786+02:00",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.18.0.0/16",
"Gateway": "172.18.0.1"
}
]
},
"Internal": false,
"Attachable": true,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"9ec175925744beaffae396f435446c6a292f247a36e87a67af0994b7d8417d9b": {
"Name": "funkwhale_redis_1",
"EndpointID": "82ebe3ceee4582666ace6ad8efda536af3d89d112e312f97022f7f4503128fdb",
"MacAddress": "02:42:ac:12:00:03",
"IPv4Address": "172.18.0.3/16",
"IPv6Address": ""
},
"c2b6ae5e4edf7f04439c9dbc8cde5efda1bc52e5be161847fb8af8e2166f3ae4": {
"Name": "funkwhale_postgres_1",
"EndpointID": "45ca2280bac4e73e3f44d935c1c4f374ab998a30875c63f97f2f77446b33403d",
"MacAddress": "02:42:ac:12:00:02",
"IPv4Address": "172.18.0.2/16",
"IPv6Address": ""
}
},
"Options": {},
"Labels": {
"com.docker.compose.network": "default",
"com.docker.compose.project": "funkwhale",
"com.docker.compose.version": "1.29.2"
}
}
]
The containers have an IP, but I can't ping other containers on the network and can't get out to the internet... I assume since you create the network as part of the compose, it should be configured correctly...