-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathcompose.yaml
More file actions
39 lines (38 loc) · 922 Bytes
/
compose.yaml
File metadata and controls
39 lines (38 loc) · 922 Bytes
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
services:
app:
image: analytics-api:v1
build:
context: .
dockerfile: Dockerfile.web
# environment:
# - PORT=8002
# - DATABASE_URL=postgresql+psycopg://time-user:time-pw@db_service:5432/timescaledb
env_file:
- .env.compose
ports:
- "8002:8002"
command: uvicorn main:app --host 0.0.0.0 --port 8002 --reload
volumes:
- ./src:/code:rw
develop:
watch:
- action: rebuild
path: Dockerfile
- action: rebuild
path: requirements.txt
- action: rebuild
path: compose.yaml
db_service:
image: timescale/timescaledb:latest-pg17
environment:
- POSTGRES_USER=time-user
- POSTGRES_PASSWORD=time-pw
- POSTGRES_DB=timescaledb
ports:
- "5432:5432"
# expose:
# - 5432
volumes:
- timescaledb_data:/var/lib/postgresql/data
volumes:
timescaledb_data: