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
Database migrations use alembic to generate and run migrations. When a database migration is needed, use the following to generate a new migration file:
65
+
66
+
```shell
67
+
python -m scripts.alembic migrate -m "description of migration"
68
+
```
69
+
70
+
Note: You'll need a local Postgres instance running to generate the migration against. You can use the same local Postgres instance used for development:
71
+
72
+
```shell
73
+
python -m scripts.start_local_postgres --migrate head
I use pre-commit to run linting and formatting checks before every commit. Install the pre-commit hooks with:
130
130
131
-
```bash
131
+
```shell
132
132
pre-commit install
133
133
```
134
134
135
135
To run the checks manually, use:
136
136
137
-
```bash
137
+
```shell
138
138
pre-commit run --all-files
139
139
```
140
140
@@ -148,7 +148,7 @@ Lint checks include (but are not limited to):
148
148
149
149
To update dependencies, run:
150
150
151
-
```bash
151
+
```shell
152
152
# Update Python dependencies
153
153
./scripts/update-requirements.sh --python
154
154
@@ -187,7 +187,7 @@ Server-side, a cron job runs every 5 minutes to check for new commits on the `re
187
187
188
188
To deploy the app manually, SSH into the server, go to the project, and use the following command:
189
189
190
-
```bash
190
+
```shell
191
191
./scripts/deploy.sh --prod
192
192
```
193
193
@@ -204,7 +204,7 @@ SSL certificates are generated by the domain registrar and are stored in the `ce
204
204
205
205
In addition to the SSL certificates, you'll need to generate a Diffie-Hellman key exchange file for nginx. You can generate this file with the following command:
0 commit comments