-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
40 lines (36 loc) · 942 Bytes
/
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
version: "3.7"
# For local development, only database is running
#
# docker-compose up -d
# uvicorn app.main:app --reload
#
services:
default_database:
restart: unless-stopped
image: postgres:latest
volumes:
- default_database_data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=${DEFAULT_DATABASE_DB}
- POSTGRES_USER=${DEFAULT_DATABASE_USER}
- POSTGRES_PASSWORD=${DEFAULT_DATABASE_PASSWORD}
env_file:
- .env
ports:
- "${DEFAULT_DATABASE_PORT}:5432"
test_database:
restart: unless-stopped
image: postgres:latest
volumes:
- test_database_data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=${TEST_DATABASE_DB}
- POSTGRES_USER=${TEST_DATABASE_USER}
- POSTGRES_PASSWORD=${TEST_DATABASE_PASSWORD}
env_file:
- .env
ports:
- "${TEST_DATABASE_PORT}:5432"
volumes:
test_database_data:
default_database_data: