-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
115 lines (108 loc) · 2.58 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
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
112
113
114
115
version: "3.5"
services:
nginx:
container_name: surface-nginx
build: ./nginx
volumes:
- ./api/static:/home/app/web/staticfiles
- ./data:/home/app/web/data
env_file:
- api/production.env
ports:
- 8080:80
depends_on:
- api
cache:
container_name: surface-cache
image: memcached
restart: unless-stopped
redis:
container_name: surface-redis
image: redis
restart: unless-stopped
postgres:
container_name: surface-database
image: timescale/timescaledb-postgis:2.3.0-pg13
restart: unless-stopped
env_file:
- api/production.env
volumes:
- ./:/app
- ./data/postgresql:/var/lib/postgresql/data
- ./data/shared:/data/shared
- ./data/backup:/data/backup
ports:
- 5432:5432
logging:
driver: "json-file"
options:
max-size: "1M"
max-file: "10"
api:
build:
dockerfile: Dockerfile
context: api
container_name: surface-api
command: ./startup.sh
env_file:
- api/production.env
restart: unless-stopped
volumes:
- ./api:/surface
- ./data/media:/data/media
- ./data/shared:/data/shared
- ./data/backup:/data/backup
- ./data/exported_data:/data/exported_data
- ./data/documents:/data/documents
depends_on:
- postgres
- cache
- redis
logging:
driver: "json-file"
options:
max-size: "1M"
max-file: "10"
celery_worker:
build:
dockerfile: Dockerfile
context: api
container_name: surface-celery-worker
command: /home/surface/.local/bin/celery -A tempestas_api worker -l info
env_file:
- api/production.env
restart: unless-stopped
volumes:
- ./api:/surface
- ./data/documents/ingest:/data/documents/ingest
- ./data/exported_data:/data/exported_data
- ./data/shared:/data/shared
- ./data/backup:/data/backup
depends_on:
- api
- redis
logging:
driver: "json-file"
options:
max-size: "1M"
max-file: "10"
celery_beat:
build:
dockerfile: Dockerfile
context: api
container_name: surface-celery-beat
restart: unless-stopped
command: /home/surface/.local/bin/celery -A tempestas_api beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler
env_file:
- api/production.env
volumes:
- ./api:/surface
- ./data/postgresql:/data
depends_on:
- api
- redis
logging:
driver: "json-file"
options:
max-size: "1M"
max-file: "10"