-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.shared.yml
More file actions
78 lines (76 loc) · 1.96 KB
/
Copy pathdocker-compose.shared.yml
File metadata and controls
78 lines (76 loc) · 1.96 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
version: '3.8'
include:
- path: ../../support/bot/docker-compose.yml
services:
postgres:
image: postgres
# ports:
# - "5432:5432"
env_file:
- postgres.env
redis:
image: "redis:6.2.7"
# ports:
# - "6379:6379"
app:
build: .
image: python/django4-celery
depends_on:
- postgres
- redis
ports:
- "4001:4001"
env_file:
- postgres.env
- ../../appsignal.env
- ../../appsignal_key.env
environment:
- PORT=4001
# The make_request view calls this second, separately-instrumented app so
# the trace propagates across services. Falls back to an external URL when
# unset (single-service runs).
- DOWNSTREAM_URL=http://downstream:4002/
volumes:
- ./app:/app
- ../integration:/integration
# A second instance of the same image, running as a distinct AppSignal app
# (agent mode) or service (collector mode). It receives the HTTP request the
# `app` service makes, so the trace continues into it. Image-only: only `app`
# builds, so `docker compose build` does not collide on the shared image tag.
downstream:
image: python/django4-celery
command: /commands/run-downstream
depends_on:
- postgres
- redis
env_file:
- postgres.env
- ../../appsignal.env
- ../../appsignal_key.env
volumes:
- ./app:/app
- ../integration:/integration
# Runs only the background worker (image-only; only `app` builds).
worker:
image: python/django4-celery
command: /commands/run-worker
depends_on:
- postgres
- redis
env_file:
- postgres.env
- ../../appsignal.env
- ../../appsignal_key.env
volumes:
- ./app:/app
- ../integration:/integration
tests:
build: ../../support/server-tests
image: server-tests
profiles:
- tests
depends_on:
- app
environment:
- APP_NAME=python/django4-celery
- APP_URL=http://app:4001