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
Note that to generate a new Entity using the CLI you must ignore all other tables using the `--ignore-tables` option. You must add the option for _each_ table you are ignoring.
Copy file name to clipboardExpand all lines: docs/runbooks/Container-README.md
+9-7Lines changed: 9 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,14 @@
2
2
3
3
*This project is a Rust-based backend/web API that connects to a PostgreSQL database. It uses Docker and Docker Compose for easy local development and deployment, and includes utilities for database management, migrations, and more. You can choose to run PostgreSQL either locally (via Docker) or remotely by configuring the environment variables.*
4
4
5
-
## **Prerequisites**
5
+
## Prerequisites
6
6
7
7
Before you begin, ensure you have the following installed:
@@ -29,6 +29,7 @@ Before you begin, ensure you have the following installed:
29
29
Create a `.env.remote-db` file and set `POSTGRES_HOST` to the external IP or hostname of the remote PostgreSQL instance.
30
30
31
31
Example `.env.local` for local development:
32
+
32
33
```env
33
34
POSTGRES_USER=refactor
34
35
POSTGRES_PASSWORD=password
@@ -42,6 +43,7 @@ Before you begin, ensure you have the following installed:
42
43
```
43
44
44
45
Example `.env.remote-db` for remote PostgreSQL:
46
+
45
47
```env
46
48
POSTGRES_USER=remote_user
47
49
POSTGRES_PASSWORD=remote_password
@@ -84,7 +86,7 @@ Before you begin, ensure you have the following installed:
84
86
- postgres
85
87
```
86
88
87
-
## **Building and Running the Application**
89
+
## Building and Running the Application
88
90
89
91
### **Step 1: Build the Docker images**
90
92
@@ -118,7 +120,7 @@ docker-compose --env-file .env.remote-db up
118
120
119
121
The Rust web API should now be running on `http://localhost:8080` and PostgreSQL should be available on port `5432` (or remotely if using the `.env.remote-db` setup).
120
122
121
-
## **Using the Database Utilities**
123
+
## Using the Database Utilities
122
124
123
125
### **Rebuild the database**
124
126
@@ -150,7 +152,7 @@ docker-compose run -v $(pwd)/sql:/app/sql -v $(pwd)/schema.dbml:/app/schema.dbml
150
152
151
153
This will output the generated SQL file in the `sql` directory.
152
154
153
-
## **Stopping the Containers**
155
+
## Stopping the Containers
154
156
155
157
To stop the containers, you can use the following command:
156
158
@@ -164,7 +166,7 @@ If you want to remove all the containers, networks, and volumes, including the P
164
166
docker-compose down -v
165
167
```
166
168
167
-
## **Troubleshooting and Gotchas**
169
+
## Troubleshooting and Gotchas
168
170
169
171
### **1. Cannot connect to PostgreSQL**
170
172
@@ -240,7 +242,7 @@ docker-compose down -v
240
242
241
243
If the data is still being wiped, make sure you are not running `docker-compose down -v` unless you want to remove the database volume.
242
244
243
-
## **Tips for Development**
245
+
## Tips for Development
244
246
245
247
- You can bring up the containers in detached mode by running:
0 commit comments