-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
66 lines (62 loc) · 1.48 KB
/
docker-compose.yml
File metadata and controls
66 lines (62 loc) · 1.48 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
54
55
56
57
58
59
60
61
62
63
64
65
66
version: "3.8"
services:
db:
image: postgres:15-alpine
container_name: kitup_db
env_file:
- .env
environment:
- POSTGRES_DB=${POSTGRES_DB:-kitup_db}
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-your_password}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
web:
image: ghcr.io/pirogramming/startlinedev/web:latest
container_name: kitup_web
env_file:
- .env
command: >
sh -c "
python manage.py migrate &&
python manage.py collectstatic --noinput &&
python manage.py runserver 0.0.0.0:8000
"
volumes:
# - .:/app
- static_volume:/app/staticfiles
- ./media:/app/media
ports:
- "8000:8000"
environment:
DB_ENGINE: django.db.backends.postgresql
DB_NAME: ${POSTGRES_DB:-kitup_db}
DB_USER: ${POSTGRES_USER:-postgres}
DB_PASSWORD: ${POSTGRES_PASSWORD:-your_password}
DB_HOST: db
DB_PORT: 5432
REDIS_HOST: redis
REDIS_PORT: 6379
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
redis:
image: redis:7-alpine
container_name: kitup_redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
volumes:
postgres_data:
static_volume:
redis_data: