-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
60 lines (57 loc) · 1.23 KB
/
docker-compose.yaml
File metadata and controls
60 lines (57 loc) · 1.23 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
services:
pubsub:
image: google/cloud-sdk:emulators
command: >
gcloud beta emulators pubsub start
--project=fastpubsub-test-project
--host-port=0.0.0.0:8085
environment:
CLOUDSDK_CORE_PROJECT: fastpubsub-test-project
ports:
- "8085:8085"
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:8085 || exit 1"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
deploy:
resources:
limits:
memory: 512M
networks:
- pubsub-net
security_opt:
- no-new-privileges:true
fastpubsub:
build:
context: .
dockerfile: Dockerfile
args:
PYTHON_VERSION: "3.12"
volumes:
- ./:/src:cached
- venv-cache:/src/.venv
- cache:/root/.cache
environment:
FASTPUBSUB_LOG_LEVEL: DEBUG
PUBSUB_EMULATOR_HOST: pubsub:8085
CLOUDSDK_CORE_PROJECT: fastpubsub-test-project
depends_on:
pubsub:
condition: service_healthy
tty: true
stdin_open: true
command: sleep infinity
deploy:
resources:
limits:
memory: 2G
networks:
- pubsub-net
networks:
pubsub-net:
driver: bridge
volumes:
venv-cache:
cache: