-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
48 lines (46 loc) · 1.18 KB
/
docker-compose.yml
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
services:
main-db:
image: pgvector/pgvector:pg16
container_name: main-db
command: postgres -c "log_lock_waits=on" -N 1000 -c "fsync=off"
environment:
POSTGRES_PASSWORD: secret123
# Set user to app to match user from template-infra (https://github.com/navapbc/template-infra)
# This is also needed for the initial migration that alters defaut privileges to grant
# table privileges to the app user (see /app/src/db/migrations/versions/2023_08_10_default_table_privileges.py)
POSTGRES_USER: app
ports:
- "5432:5432"
volumes:
- dbdata:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
main-app:
build:
context: ./app
target: dev
args:
- RUN_UID=${RUN_UID:-4000}
- RUN_USER=${RUN_USER:-app}
command:
[
"poetry",
"run",
"uvicorn",
"src.app:app",
"--host",
"0.0.0.0",
"--port",
"8000",
"--reload",
]
container_name: main-app
env_file: ./app/local.env
ports:
- 8000:8000
- 8888:8888
volumes:
- ./app:/app
depends_on:
- main-db
volumes:
dbdata: