-
Notifications
You must be signed in to change notification settings - Fork 4
/
compose.yml
111 lines (110 loc) · 2.81 KB
/
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
version: '3.7'
services:
django:
build:
context: .
dockerfile: ./docker/Dockerfile
container_name: cameratrap-django-container
image: cameratrap-django-image
depends_on:
- postgres
volumes:
- .:/code
- ../ct22-volumes/static:/ct22-volumes/static
- ../ct22-volumes/media:/ct22-volumes/media
- ../ct22-volumes/bucket:/bucket
- ../ct22-volumes/logs/ct-web:/var/log/ct-web
command: /srv/start
restart: always
#env_file:
# - .env
environment:
- WEB_ENV=dev
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=example
- POSTGRES_DB=cameratrap
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "3"
postgres:
#image: postgres:13-alpine
shm_size: '1g'
build:
context: ./docker
dockerfile: Dockerfile_postgres
image: cameratrap-postgres-image
container_name: cameratrap-postgres-container
volumes:
- ../ct22-volumes/pgdata:/var/lib/postgresql/data/pgdata
- ../ct22-volumes/bucket:/bucket
- ./initdb:/docker-entrypoint-initdb.d
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=example
- POSTGRES_DB=cameratrap
- PGDATA=/var/lib/postgresql/data/pgdata
#env_file:
# - .env
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "3"
redis:
image: redis:6-alpine
restart: always
celery:
restart: unless-stopped
container_name: cameratrap-celery-container
image: cameratrap-django-image
command: celery -A conf worker -l info -c 1
volumes:
- .:/code
- ../ct22-volumes/media:/ct22-volumes/media
- ../ct22-volumes/logs/ct-web:/var/log/ct-web
depends_on:
- redis
- django
environment:
- WEB_ENV=dev
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=example
- POSTGRES_DB=cameratrap
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "3"
flower:
restart: unless-stopped
container_name: cameratrap-flower-container
image: cameratrap-django-image
ports:
- 5555:5555
command: celery flower -persisten=True --port=5555
volumes:
- .:/code
- ../ct22-volumes/media:/ct22-volumes/media
- ../ct22-volumes/logs/ct-web:/var/log/ct-web
depends_on:
- redis
- django
environment:
- WEB_ENV=dev
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=example
- POSTGRES_DB=cameratrap
- CELERY_BROKER_URL=redis://redis:6379/3
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "3"