-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
115 lines (111 loc) · 3.07 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
services:
localstack:
container_name: "${LOCALSTACK_DOCKER_NAME-localstack_main}"
image: localstack/localstack
ports:
- "127.0.0.1:4566:4566" # LocalStack Gateway
- "127.0.0.1:4510-4559:4510-4559" # external services port range
environment:
- DEBUG=${DEBUG-}
- DOCKER_HOST=unix:///var/run/docker.sock
- SERVICES=${SERVICES:-sqs,dynamodb}
- PERSISTENCE=${PERSISTENCE:-0}
volumes:
- "${LOCALSTACK_VOLUME_DIR:-./.localstack_volume}:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
- ./localstack:/etc/localstack/init/ready.d
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4566/_localstack/health"]
interval: 10s
timeout: 1s
retries: 10
opa:
build:
context: .
dockerfile: Dockerfile.opa
target: prod
command:
- run
- --server
- --log-level=debug
- --disable-telemetry
- --addr=0.0.0.0:8181
- /policies/
- /roles/
volumes:
- ./packages/opa/authz:/policies
- ./dev:/roles
ports:
- 8181:8181
automated-actions:
restart: always
env_file:
- settings.conf
environment:
- AA_BROKER_URL=sqs://localstack:4566
- AA_SQS_URL=http://localstack:4566/000000000000/automated-actions
- AA_DYNAMODB_URL=http://localstack:4566
build:
context: .
dockerfile: Dockerfile
target: prod
ports:
- "8080:8080"
depends_on:
localstack:
condition: service_healthy
opa:
condition: service_started
volumes:
- ./packages/automated_actions:/opt/app-root/src/packages/automated_actions
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/healthz"]
start_interval: 1s
interval: 1m
timeout: 1s
retries: 10
celery-worker:
restart: always
env_file:
- settings.conf
environment:
- AA_START_MODE=worker
- AA_BROKER_URL=sqs://localstack:4566
- AA_SQS_URL=http://localstack:4566/000000000000/automated-actions
- AA_DYNAMODB_URL=http://localstack:4566
build:
context: .
dockerfile: Dockerfile
target: prod
ports:
- "8001:8001"
depends_on:
localstack:
condition: service_healthy
volumes:
- ./packages/automated_actions:/opt/app-root/src/packages/automated_actions
generate-automated-actions-client:
restart: never
build:
context: .
dockerfile: Dockerfile.client
target: base
profiles:
- dont-start-automatically
entrypoint:
- uv
- run
- --frozen
- openapi-python-client
command:
- generate
- --url=http://automated-actions:8080/docs/openapi.json
- --meta=none
- --output-path=automated_actions_client
- --custom-template-path=openapi_python_client_templates
- --overwrite
depends_on:
automated-actions:
condition: service_healthy
volumes:
- ./packages/automated_actions_client/automated_actions_client:/opt/app-root/src/automated_actions_client