-
Notifications
You must be signed in to change notification settings - Fork 20
/
test-compose.yml
107 lines (104 loc) · 4.26 KB
/
test-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
version: "3.4"
services:
redis:
image: redis:7.2-rc2
hostname: redis
web:
build:
context: .
dockerfile: Dockerfile
target: calcus_dev
hostname: web
user: "${UID}:${GID}"
expose:
- 8000
depends_on:
- redis
volumes:
- scratch:/calcus/scratch
- ./frontend/tests/cache:/calcus/cache:rw
env_file:
- ./.env
environment:
- CALCUS_DEBUG=True
- CALCUS_TEST=True
- ACTIONS_HOST_URL=http://web:8000
- COMPUTE_SMALL_HOST_URL=http://cloud-compute:8001
- COMPUTE_MEDIUM_HOST_URL=http://cloud-compute:8001
- COMPUTE_LARGE_HOST_URL=http://cloud-compute:8001
- GCP_LOCATION=us-central1
- GCP_PROJECT_ID=test-project
- USE_CACHED_LOGS=true
links:
- redis
- taskqueue
- cloud-compute
- stripe-cli
taskqueue:
image: ghcr.io/aertje/cloud-tasks-emulator:latest
command: -host 0.0.0.0 -port 8123 -queue projects/test-project/locations/us-central1/queues/xtb-compute -queue projects/test-project/locations/us-central1/queues/actions
expose:
- 8123
stripe-cli:
image: stripe/stripe-cli
command: listen --forward-to cloud-compute:8001/webhook/ --api-key $STRIPE_SECRET_KEY
cloud-compute:
build:
context: .
dockerfile: Cloud_dockerfile
hostname: cloud-compute
user: "${UID}:${GID}"
expose:
- 8001
depends_on:
- redis
volumes:
- scratch:/calcus/scratch
- ./frontend/tests/cache:/calcus/cache:rw
env_file:
- ./.env
environment:
- CALCUS_DEBUG=True
- CALCUS_TEST=True
- CALCUS_CLOUD=True
- NUM_THREADS=4
- NUM_WORKERS=1
- IS_TEST_CLUSTER_DAEMON=True
- PORT=8001
- GCP_LOCATION=us-central1
- GCP_PROJECT_ID=test-project
- ACTIONS_HOST_URL=http://web:8000
- COMPUTE_SMALL_HOST_URL=http://cloud-compute:8001
- COMPUTE_MEDIUM_HOST_URL=http://cloud-compute:8001
- COMPUTE_LARGE_HOST_URL=http://cloud-compute:8001
- CALCUS_SCR_HOME=/calcus/scr
- CALCUS_TEST_SCR_HOME=/calcus/scr
- GUNICORN_TIMEOUT=15
- USE_CACHED_LOGS=true
selenium:
container_name: selenium
image: selenium/standalone-chrome:latest
ports:
- "4444:4444"
- "5900:5900"
links:
- web
shm_size: '1gb' # Necessary to ensure that selenium does not crash
environment:
- SCREEN_WIDTH=1920
- SCREEN_HEIGHT=1080
postgres:
image: postgres:11-bullseye
user: "${UID}:${GID}"
volumes:
- ./data:/var/lib/postgresql/data/:rw
env_file:
- ./.env
environment:
- PGDATA=./var/lib/postgresql/data/
- POSTGRES_USER=calcus
- POSTGRES_DB=calcus
volumes:
scratch: