-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
57 lines (50 loc) · 1.3 KB
/
docker-compose.yaml
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
version: "3"
services:
app:
build:
context: .
args:
- ENVIRONMENT=local
ports:
- "8080:8080"
entrypoint: ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8080", "--reload"]
volumes:
- ./app:/usr/src/app
- ./models:/usr/src/models
environment:
- db_postgres_host=postgresql://ambax:black@postgresdb:5432/pythonforSE
- db_redis_host=redis://redis
depends_on:
- postgresdb
- redis
app-test:
build:
context: .
args:
- ENVIRONMENT=test
volumes:
- .:/usr/src
entrypoint: ["sleep", "infinity"]
environment:
- db_postgres_host=postgresql://ambax:black@testingdb:5432/pythonforSE
- app_env=test
depends_on:
- testingdb
postgresdb:
image: postgres:14.1-alpine
env_file:
- .env-local
ports:
- "5432:5432"
volumes:
- pgdb:/var/lib/postgresql/data
testingdb:
image: postgres:14.1-alpine
env_file:
- .env-local
redis:
image: redis:6.2-alpine
ports:
- "6379:6379"
volumes:
pgdb: