You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Store these details securely in a `.env.production` file (you will need to set them later in application deployment as production secrets):
55
+
56
+
```bash
57
+
# Database connection parameters
58
+
DB_HOST=your-host
59
+
DB_PORT=your-port
60
+
DB_USER=your-user
61
+
DB_PASS=your-password
62
+
DB_NAME=your-database
63
+
```
64
+
65
+
You may also want to save your database id, although you can always find it again later by listing your databases with `doctl databases list`.
66
+
67
+
#### Setting Up a Firewall Rule (after Deploying Your Application Layer)
68
+
69
+
Note that by default your database is publicly accessible from the Internet, so you should create a firewall rule to restrict access to only your application's IP address once you have deployed the application. The command to do this is:
where `<type>` is `ip_addr` and `<value>` is the IP address of the application server. See the [DigitalOcean documentation](https://docs.digitalocean.com/reference/doctl/reference/databases/firewalls/append/) for more details.
76
+
77
+
**Note:** You can only complete this step after you have deployed your application layer and obtained the IP address of the application server.
0 commit comments