-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
todo.txt
87 lines (50 loc) · 1.92 KB
/
todo.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
this sucks => import {Viewer} from "/static/js/icosa-viewer.module.js?v={% now "U" %}";
Add max complexity as a search filter
orderBy is currently:
BEST, NEWEST, OLDEST. Defaults to BEST, which ranks assets
based on a combination of popularity and other features.
We should improve this, but probably keep the existing variants working. BEST could possibly be "number of likes" or something for now.
we should accept snake_case and camelCase url params and do the translation. The openapi docs should list both as accepted styles. If we get both variants of the same param, just choose the value of whatever we got first.
Docs for potential inclusion TODO include some info on how to wrangle this with Windows:
## Seeding the database
TODO - explain what "seeding" means and why you'd want to
TODO - explain "from inside the container"
### With a .dump file
```
docker cp <db.dump> ig-db:/opt/
docker exec -it ig-db bash
```
Then from inside the container:
`pg_restore --data-only -U icosa -d icosa /opt/<db.dump>`
### With a .sql file
```
docker cp <db.sql> ig-db:/opt/
docker exec -it ig-db bash
```
Then from inside the container:
`psql -U icosa`
Then from inside the postgres shell:
Make sure you are connected to the correct database:
`\c`
You should see `You are now connected to database "icosa" as user "icosa".`
Import the sql data:
`\i /opt/db.sql`
## Running updated versions of the code
TODO - how are people meant to distinguish between 2 and 3?
Give them a single, safe default action even if it's a bit slower
Is (3) even needed? Seems to happen automatically for me.
There are 3 possible scenarios:
### 1. You've updated your own .env files
```
docker compose down
docker compose build
docker compose up
```
### 2. Incoming code has updated requirements.txt/requirements.in
```
docker compose down`
docker compose build`
docker compose up
```
### 3. Incoming code has updated anything else
`docker compose restart`