-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
53 lines (49 loc) · 1.08 KB
/
compose.yml
File metadata and controls
53 lines (49 loc) · 1.08 KB
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
services:
db:
image: postgres:18.1-alpine
container_name: littlelemon-db
restart: unless-stopped
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
ports:
- ${DB_PORT:-5432}:5432
volumes:
- postgres_data:/var/lib/postgresql
networks:
- littlelemon_net
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $DB_USER -d $DB_NAME"]
interval: 5s
timeout: 5s
retries: 5
littlelemon:
build: .
command: python littlelemon/manage.py runserver 0.0.0.0:8000
volumes:
- .:/app
ports:
- "${HOST_PORT:-8000}:8000"
networks:
- littlelemon_net
depends_on:
db:
condition: service_healthy
nginx:
image: nginx:alpine
ports:
- "80:80"
- "443:443"
networks:
- littlelemon_net
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
- ./ssl:/etc/nginx/ssl:ro
depends_on:
- littlelemon
networks:
littlelemon_net:
volumes:
postgres_data:
name: littlelemon_postgres_data