Commit c685523
feat!: migrate from PostgreSQL to SQLite with persistent Docker volume
BREAKING CHANGE: PostgreSQL is no longer supported. SQLite is the sole
database provider, configured via DB_PATH env var (default: /data/meetup_bot.db).
Database:
- Remove postgres branch from get_db_config(), add DB_PATH env var
- Enable WAL mode via raw sqlite3 connection after PonyORM mapping
- Remove psycopg2-binary and testcontainers[postgres] dependencies
Docker:
- Rename Dockerfile.web to Dockerfile, delete Dockerfile.dev
- Add /data directory with appuser permissions in Dockerfile
- Remove postgres service from docker-compose.yml
- Replace pgdata volume with db_data:/data for SQLite persistence
CI:
- Delete smoke-test.yml workflow
- Remove DB_HOST, DB_NAME, DB_PORT from pytest.yml env blocks
- Update Dockerfile references in docker.yml workflow
Tests:
- Consolidate 6 unit test files into test_unit.py
- Move test_smoke.py into test_integration.py
- Rewrite test_e2e.py to use tempfile SQLite instead of PostgresContainer
- Add DISABLE_IP_WHITELIST env var and set DEV=false in e2e env to
properly test unauthenticated request rejection from localhost
- Remove DEV=true workaround from conftest.py, set DB_PATH to temp path
Cleanup:
- Delete heroku.yml
- Update .env.example, README.md, architecture.md, devcontainer.json,
taskfiles/docker.yml, taskfiles/pytest.yml
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 1c9f1de commit c685523
26 files changed
Lines changed: 990 additions & 1328 deletions
File tree
- .devcontainer
- .github/workflows
- app
- docs
- taskfiles
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | 13 | | |
16 | | - | |
17 | | - | |
18 | 14 | | |
19 | 15 | | |
20 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | 29 | | |
32 | | - | |
33 | 30 | | |
34 | 31 | | |
35 | 32 | | |
| |||
63 | 60 | | |
64 | 61 | | |
65 | 62 | | |
66 | | - | |
67 | | - | |
68 | 63 | | |
69 | | - | |
70 | 64 | | |
71 | 65 | | |
72 | 66 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| |||
96 | 95 | | |
97 | 96 | | |
98 | 97 | | |
99 | | - | |
| 98 | + | |
100 | 99 | | |
101 | 100 | | |
102 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
43 | 34 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
51 | 38 | | |
52 | 39 | | |
53 | 40 | | |
54 | | - | |
| 41 | + | |
55 | 42 | | |
56 | 43 | | |
57 | 44 | | |
| |||
60 | 47 | | |
61 | 48 | | |
62 | 49 | | |
63 | | - | |
| 50 | + | |
64 | 51 | | |
65 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
66 | 60 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
| |||
232 | 235 | | |
233 | 236 | | |
234 | 237 | | |
235 | | - | |
| 238 | + | |
236 | 239 | | |
237 | 240 | | |
238 | 241 | | |
| |||
0 commit comments