Database Cleanup while writing a new Import Script

thanks!
I got these error in docker:

root@infdis-app:/var/www/discourse# bundle exec rake db:drop db:create db:migrate DISABLE_DATABASE_ENVIRONMENT_CHECK=1
===========================================
 DEPRECATION: The cocaine gem is deprecated. Please upgrade to terrapin. See https://github.com/thoughtbot/terrapin/ for further instructions.
===========================================
PG::InsufficientPrivilege: ERROR:  must be owner of database discourse
: DROP DATABASE IF EXISTS "discourse"
Couldn't drop database 'discourse'
rake aborted!

but after I su - discourse, I got another error:

discourse@infdis-app:/var/www/discourse$ bundle exec rake db:drop db:create db:migrate DISABLE_DATABASE_ENVIRONMENT_CHECK=1
===========================================
 DEPRECATION: The cocaine gem is deprecated. Please upgrade to terrapin. See https://github.com/thoughtbot/terrapin/ for further instructions.
===========================================
rake aborted!
Errno::EACCES: Permission denied @ rb_sysopen - /var/www/discourse/tmp/ember-rails/ember.js