-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproduction.yml
More file actions
116 lines (103 loc) · 2.77 KB
/
production.yml
File metadata and controls
116 lines (103 loc) · 2.77 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
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
116
version: '3'
volumes:
production_postgres_data: {}
production_postgres_data_backups: {}
production_traefik: {}
production_django_media: {}
django_staticfiles: {}
services:
nginx:
image: nginx:1.15
restart: unless-stopped
depends_on:
- django
ports:
# Map standard HTTP/HTTPS ports from the host
# to the NGINX container.
- 80:80
- 443:443
volumes:
- /opt/ssl:/etc/ssl
- ./compose/production/nginx/dcc.conf:/etc/nginx/conf.d/dcc.conf
- django_staticfiles:/var/staticfiles
- ./uploads:/var/mediafiles/uploads
env_file:
- ./.envs/.production/.nginx
networks:
- frontend
django: &django
build:
context: .
dockerfile: ./compose/production/django/Dockerfile
image: open_exploit_database_scraping_production_django
volumes:
- production_django_media:/app/open_exploit_database_scraping/media
- django_staticfiles:/var/staticfiles
depends_on:
- postgres
- redis
env_file:
- ./.envs/.production/.django
- ./.envs/.production/.postgres
command: /start
networks:
- backend
- frontend
postgres:
build:
context: .
dockerfile: ./compose/production/postgres/Dockerfile
image: open_exploit_database_scraping_production_postgres
volumes:
- production_postgres_data:/var/lib/postgresql/data
- production_postgres_data_backups:/backups
env_file:
- ./.envs/.production/.postgres
networks:
- backend
# add redis as a message broker
redis:
image: "redis:alpine"
networks:
- celery
- backend
- frontend
# tor service
tor:
image: oeds_tor:latest
build:
context: .
dockerfile: ./compose/local/tor/Dockerfile
container_name: oeds_tor
ports:
- "127.0.0.1:9050:9050"
- "127.0.0.1:9051:9051"
networks:
- frontend
# celery worker process -- launches child celery processes equal to the number of available cores
celeryworker:
<<: *django
image: djangoapp_celeryworker:latest
container_name: djangoapp_celeryworker
depends_on:
- redis
- postgres
ports: []
command: celery -A config.celery_app worker -l info -Q celery
# celery worker process -- launches child celery processes equal to the number of available cores
celerybeat:
<<: *django
image: oedb_local_celerybeat
container_name: oedb_local_celerybeat
depends_on:
- redis
- postgres
ports: []
command: celery -A django_cog beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler
networks:
frontend:
name: djangocog_frontend
backend:
name: djangocog_backend
celery:
name: djangocog_celery