-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-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:
project:
container_name: project
build:
context: .
deploy:
resources:
limits:
cpus: "1"
memory: 1024M
ports:
- "8000:8000"
volumes:
- ./project:/project
- ./data/web/static:/data/web/static
- ./data/web/media:/data/web/media
env_file:
- ./dotenv_files/.env
depends_on:
- project_db
project_db:
container_name: project_db
user: "postgres"
environment:
POSTGRES_USER: postgres
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
image: postgres:13-alpine
deploy:
resources:
limits:
cpus: "1"
memory: 1024M
volumes:
- project_db:/var/lib/postgresql/data
ports:
- "5432:5432"
env_file:
- ./dotenv_files/.env
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
volumes:
project_db: