forked from beatonma/django-wm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
88 lines (77 loc) · 2.23 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
version: "3"
# Run two instances of `sample-project`
#
# Instance #1:
# - Accessible at http://localhost:8001
# - Uses `celery` and `RabbitMQ` to handle webmentions.
#
# Instance #2:
# - Accessible at http://localhost:8002
# - Uses `cron` to handle webmentions, scheduled to run every minute.
#
# Each instance can send mentions to the other one.
services:
with-celery-db:
image: postgres
env_file:
- ./sample-project/docker/.env
- ./sample-project/docker/with-celery/.env
ports:
- "5432"
with-celery-rabbitmq:
image: rabbitmq:3-alpine
env_file:
- ./sample-project/docker/.env
- ./sample-project/docker/with-celery/.env
ports:
- "5672"
with-celery-web.org:
build:
dockerfile: ./sample-project/docker/with-celery/Dockerfile
context: .
depends_on:
- with-celery-db
- with-celery-rabbitmq
env_file:
- ./sample-project/docker/.env
- ./sample-project/docker/with-celery/.env
ports:
- "8001:80"
command: ["bash", "/usr/src/app/docker/wait-for-it.sh", "with-celery-db:5432", "--", "bash", "/usr/src/app/docker/with-celery/entrypoint.sh"]
with-celery-cron:
build:
dockerfile: ./sample-project/docker/with-celery/Dockerfile
context: .
depends_on:
- with-celery-db
- with-celery-web.org
env_file:
- ./sample-project/docker/.env
- ./sample-project/docker/with-celery/.env
command: crond -l 2 -f
no-celery-db:
image: postgres
env_file: ./sample-project/docker/no-celery/.env
no-celery-web.org:
build:
dockerfile: ./sample-project/docker/no-celery/Dockerfile
context: .
depends_on:
- no-celery-db
env_file:
- ./sample-project/docker/.env
- ./sample-project/docker/no-celery/.env
ports:
- "8002:80"
command: ["bash", "/usr/src/app/docker/wait-for-it.sh", "no-celery-db:5432", "--", "bash", "/usr/src/app/docker/no-celery/entrypoint.sh"]
no-celery-cron:
build:
dockerfile: ./sample-project/docker/no-celery/Dockerfile
context: .
depends_on:
- no-celery-db
- no-celery-web.org
env_file:
- ./sample-project/docker/.env
- ./sample-project/docker/no-celery/.env
command: crond -l 2 -f