-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
43 lines (40 loc) · 1.04 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
version: '3.9'
services:
postgres:
image: postgres:latest
ports:
- 5432:5432
environment:
- POSTGRES_USER=${m_db_username}
- POSTGRES_PASSWORD=${m_db_password}
- POSTGRES_DB=${m_db_dbname}
volumes:
- postgres_data:/var/lib/postgresql/data
redis:
image: redis:latest
ports:
- 6379:6379
volumes:
- /tmp/redis_data:/var/lib/redis/data
api:
build:
context: .
dockerfile: Dockerfile
ports:
- 8000:8000
environment:
- postgres=${postgres}
- test=${test}
- jwt_secret=${jwt_secret}
- DB_URL=postgresql://${m_db_username}:${m_db_password}@postgres:5432/${m_db_dbname}?sslmode=disable
- TEST_DB_URL=postgresql://${m_db_username}:${m_db_password}@postgres:5432/${m_test_db_dbname}?sslmode=disable
- REDIS_URL=redis:6379
depends_on:
- postgres
- redis
entrypoint: ["/app/wait-for.sh", "postgres:5432", "--", "/app/start.sh"]
command: ["/app/api"]
restart: always
volumes:
postgres_data:
redis_data: