-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
84 lines (78 loc) · 1.75 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
version: "3.9"
services:
postgres:
image: postgres
container_name: postgres
volumes:
- ./db_files:/var/lib/postgresql/data
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres_aefjawef32234234
ports:
- "5432:5432"
# healthcheck:
# test: ["CMD-SHELL", "pg_isready -U postgres"]
# interval: 5s
# timeout: 5s
# retries: 5
backend:
build:
context: .
command: ./wait-for-it.sh postgres:5432 -- ./docker-entrypoint.sh
volumes:
- ./:/usr/src/app/
- ./staticfiles:/usr/src/app/staticfiles
- ./mediafiles:/usr/src/app/mediafiles
environment:
- IS_POSTGRESQL=1
- POSTGRES_NAME=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres_aefjawef32234234
depends_on:
- postgres
- redis
expose:
- 8000
nginx:
build:
context: ./nginx/
ports:
- 80:80
volumes:
- ./nginx/conf.d/:/etc/nginx/conf.d/
- ./staticfiles:/home/app/staticfiles
- ./mediafiles:/home/app/mediafiles
depends_on:
- backend
redis:
image: redis:6.2-alpine
ports:
- 6379:6379
restart: always
# celery:
# build: .
# command: celery -A eccomerce_api worker --loglevel=info
# depends_on:
# - redis
# volumes:
# - .:/usr/src/app/
# celery-beat:
# build: .
# command: celery -A eccomerce_api beat
# depends_on:
# - redis
# - celery
# volumes:
# - .:/usr/src/app/
# flower:
# build: .
# command: celery -A eccomerce_api flower
# depends_on:
# - redis
# - celery
# - celery-beat
# ports:
# - 5555:5555
# volumes:
# - .:/usr/src/app/