database is open to the internet on port port
Anyone can connect and read or wipe the data. A cloud firewall outside the server cannot be seen from here, so this is likely, not confirmed.
bind the port to 127.0.0.1 in docker-compose.yml, then
docker compose up -d serviceThe fix changes with how the server is set up:
recreate the container with -p 127.0.0.1:port:port in place of -p port:portset bind 127.0.0.1 ::1 in /etc/redis/redis.conf, then sudo systemctl restart redis-serverset bindIp: 127.0.0.1 under net: in /etc/mongod.conf, then sudo systemctl restart mongodset listen_addresses = 'localhost' in postgresql.conf, then sudo systemctl restart postgresqlset bind-address = 127.0.0.1 in /etc/mysql/mysql.conf.d/mysqld.cnf, then sudo systemctl restart mysql