Utilize a Cloud Database¶
Quick Guide¶
-
Consider joining forces! Simmate is designed for sharing results, so reach out to
simmate.team@gmail.com
to discuss becoming part of our team. This will help you bypass the complexities of managing your own database. If you decide to join, you'll only need to follow steps 3 and 4 of this guide. -
Establish a cloud database that is supported by django. We strongly suggest using Postgres as well as setting up a connection pool for your database. If you need assistance with this setup, you can utilize our "deploy" button in the following section. A 10GB database is sufficient to begin with.
-
Ensure you have the necessary database dependencies installed. For example for postgres, execute the following command:
conda install -n my_env -c conda-forge psycopg2
-
Update the file
~/simmate/my_env-settings.yaml
with your connection details that align with the django format. For example, the following can be added to your settings file:database: engine: django.db.backends.postgresql host: simmate-database-do-user-8843535-0.b.db.ondigitalocean.com name: simmate-database-00-pool user: doadmin password: ryGEc5PDxC2IHDSM port: 25061 options: sslmode: require
-
If you have created a brand new database in step 2, you will need to reset your database to build initial tables. Use the command
simmate database reset
to do this. Do NOT execute this command if you have joined a shared database!
Setup with Digital Ocean¶
We recommend using Postgres via DigitalOcean. If you don't have a Digital Ocean account, please sign up using our referral link. The button below will direct you to the appropriate page.
Setup with Docker-Desktop¶
If you would like to practice with Postgres on your local computer, you can use:
docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d postgres
Refer to the offical guide here.