Docker compose up problem

https://docs.cortezaproject.org/corteza-docs/2023.9/devops-guide/examples/deploy-online/index.html

docker-compose up
Creating mycorteza_db_1 ... 
Creating mycorteza_db_1 ... done
Creating mycorteza_server_1 ... 
Creating mycorteza_server_1 ... done
Attaching to mycorteza_db_1, mycorteza_server_1
db_1      | Initializing database
db_1      | mysqld: Can't create/write to file '/var/lib/mysql/is_writable' (OS errno 13 - Permission denied)
db_1      | 2024-05-21T10:21:13.609550Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
db_1      | 2024-05-21T10:21:13.609698Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.36-28) initializing of server in progress as process 15
db_1      | 2024-05-21T10:21:13.614129Z 0 [ERROR] [MY-010460] [Server] --initialize specified but the data directory exists and is not writable. Aborting.
db_1      | 2024-05-21T10:21:13.614143Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
db_1      | 2024-05-21T10:21:13.614184Z 0 [ERROR] [MY-010119] [Server] Aborting
db_1      | 2024-05-21T10:21:13.614411Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.36-28)  Percona Server (GPL), Release 28, Revision 47601f19.
server_1  | {"level":"warn","ts":1716286875.879484,"logger":"store","msg":"could not connect to the database","error":"dial tcp 10.22.0.2:3306: connect: connection refused","try":1,"delay":10}
mycorteza_db_1 exited with code 1
db_1      | Initializing database
db_1      | mysqld: Can't create/write to file '/var/lib/mysql/is_writable' (OS errno 13 - Permission denied)
db_1      | 2024-05-21T10:21:13.609550Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
db_1      | 2024-05-21T10:21:13.609698Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.36-28) initializing of server in progress as process 15
db_1      | 2024-05-21T10:21:13.614129Z 0 [ERROR] [MY-010460] [Server] --initialize specified but the data directory exists and is not writable. Aborting.
db_1      | 2024-05-21T10:21:13.614143Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
db_1      | 2024-05-21T10:21:13.614184Z 0 [ERROR] [MY-010119] [Server] Aborting
db_1      | 2024-05-21T10:21:13.614411Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.36-28)  Percona Server (GPL), Release 28, Revision 47601f19.
db_1      | Initializing database
db_1      | mysqld: Can't create/write to file '/var/lib/mysql/is_writable' (OS errno 13 - Permission denied)
db_1      | 2024-05-21T10:21:15.964950Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
db_1      | 2024-05-21T10:21:15.965095Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.36-28) initializing of server in progress as process 13
db_1      | 2024-05-21T10:21:15.969579Z 0 [ERROR] [MY-010460] [Server] --initialize specified but the data directory exists and is not writable. Aborting.
db_1      | 2024-05-21T10:21:15.969589Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
db_1      | 2024-05-21T10:21:15.969636Z 0 [ERROR] [MY-010119] [Server] Aborting
db_1      | 2024-05-21T10:21:15.969815Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.36-28)  Percona Server (GPL), Release 28, Revision 47601f19.
db_1      | Initializing database
db_1      | mysqld: Can't create/write to file '/var/lib/mysql/is_writable' (OS errno 13 - Permission denied)
db_1      | 2024-05-21T10:21:17.167797Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
db_1      | 2024-05-21T10:21:17.167953Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.36-28) initializing of server in progress as process 15
db_1      | 2024-05-21T10:21:17.172497Z 0 [ERROR] [MY-010460] [Server] --initialize specified but the data directory exists and is not writable. Aborting.
db_1      | 2024-05-21T10:21:17.172512Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
db_1      | 2024-05-21T10:21:17.172553Z 0 [ERROR] [MY-010119] [Server] Aborting
db_1      | 2024-05-21T10:21:17.172762Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.36-28)  Percona Server (GPL), Release 28, Revision 47601f19.

Seems to me based on the first line, you don’t have the permission to write to that database.

@jfortun 'm just following the docker-compose up installation guide. how to resolve?

Unfortunately i dont know.

@jfortun can u pls help answer the other questions pls? kind of urgently need answers too.

i managed to get this working but not using the tutorial

Does the folder you’ve used have the appropriate permissions so it can be read/written by Docker? I’d suggest you do it like this instead for your case Volumes | Docker Docs

Best installation instructions.