-
Notifications
You must be signed in to change notification settings - Fork 25
/
compose-dev.yml
122 lines (109 loc) · 3.37 KB
/
compose-dev.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
116
117
118
119
120
121
122
version: '3.8'
services:
app:
environment:
DJANGO_SETTINGS_MODULE: mlarchive.settings.settings
SECRET_KEY: 2y&2u=%@di1tnc3gt82e9p@$7cq7nbctll41d02@e$#=9jrzj$
DATABASES_PASSWORD: franticmarble
DATABASES_HOST: db
ELASTICSEARCH_HOST: es
build:
context: .
dockerfile: docker/app.Dockerfile
init: true
# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
# network_mode: service:db
depends_on:
- db
- es
- rabbit
ipc: host
volumes:
- app-data:/data
- app-assets:/assets
es:
image: "elasticsearch:7.17.4"
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)
environment:
- discovery.type=single-node
- xpack.security.enabled=true
- ELASTIC_PASSWORD=changeme
volumes:
- es-data:/usr/share/elasticsearch/data
db:
image: postgres:14.6
restart: always
environment:
POSTGRES_DB: mailarch
POSTGRES_USER: mailarch
POSTGRES_PASSWORD: franticmarble
POSTGRES_HOST_AUTH_METHOD: trust
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)
volumes:
- postgresdb-data:/var/lib/postgresql/data
- app-assets:/assets
rabbit:
image: rabbitmq:3.12-alpine
restart: always
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)
celery:
build:
context: .
dockerfile: build/app/Dockerfile
init: true
environment:
CELERY_APP: mlarchive.celeryapp:app
CONTAINER_ROLE: celery
UPDATE_REQUIREMENTS_FROM: requirements.txt
BROKER_URL: amqp://guest:guest@rabbit:5672//
DJANGO_SETTINGS_MODULE: mlarchive.settings.settings
SECRET_KEY: 2y&2u=%@di1tnc3gt82e9p@$7cq7nbctll41d02@e$#=9jrzj$
DATABASES_PASSWORD: franticmarble
DATABASES_HOST: db
ELASTICSEARCH_HOST: es
# command:
# - '--loglevel=INFO'
# depends on /data subdirectories
depends_on:
- app
restart: unless-stopped
stop_grace_period: 1m
volumes:
- app-data:/data
- app-assets:/assets
beat:
build:
context: .
dockerfile: build/app/Dockerfile
init: true
environment:
CELERY_APP: mlarchive.celeryapp:app
CONTAINER_ROLE: beat
UPDATE_REQUIREMENTS_FROM: requirements.txt
BROKER_URL: amqp://guest:guest@rabbit:5672//
DJANGO_SETTINGS_MODULE: mlarchive.settings.settings
SECRET_KEY: 2y&2u=%@di1tnc3gt82e9p@$7cq7nbctll41d02@e$#=9jrzj$
DATABASES_PASSWORD: franticmarble
DATABASES_HOST: db
ELASTICSEARCH_HOST: es
command:
- '--loglevel=INFO'
- '--scheduler=django_celery_beat.schedulers:DatabaseScheduler'
# depends on /data subdirectories
depends_on:
- app
restart: unless-stopped
stop_grace_period: 1m
volumes:
- app-data:/data
- app-assets:/assets
volumes:
app-assets:
app-data:
postgresdb-data:
es-data: