-
Notifications
You must be signed in to change notification settings - Fork 20
/
cloud-compose.yml
117 lines (111 loc) · 4.56 KB
/
cloud-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
116
117
version: "3.4"
services:
redis:
image: redis:latest
hostname: redis
web:
build:
context: .
dockerfile: Cloud_dockerfile
target: calcus_user
restart: always
hostname: web
user: "${UID}:${GID}"
command: ./scripts/run_web.sh
expose:
- 8000
volumes:
- .:/calcus/
- ./scr:/calcus/scr
- ./keys:/calcus/keys
- ./backups:/calcus/backups
- ./logs:/calcus/logs
- ./frontend:/calcus/frontend
links:
- redis
env_file:
- ./.env
depends_on:
- postgres
environment:
- GUNICORN_TIMEOUT=30
- CALCUS_DEBUG=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
nginx:
image: nginx:latest
ports:
- "8080:8080"
volumes:
- ./docker/nginx/:/etc/nginx/conf.d
- ./static:/static
- .:/calcus
depends_on:
- web
taskqueue:
image: raphaelrobidas/cloud-tasks-emulator:latest
environment:
QUEUE_HOST: taskqueue # should be "localhost" for Github actions
QUEUE_PORT: 8123
QUEUE_NAME: projects/test-project/locations/us-central1/queues/xtb-compute,projects/test-project/locations/us-central1/queues/actions,projects/test-project/locations/us-central1/queues/analytics
expose:
- 8123
depends_on:
- web
cloud-compute:
build:
context: .
dockerfile: Cloud_dockerfile
hostname: cloud-compute
user: "${UID}:${GID}"
expose:
- 8001
depends_on:
- redis
volumes:
- ./scr:/calcus/scr
- ./keys:/calcus/keys
- ./backups:/calcus/backups
- ./logs:/calcus/logs
- ./frontend:/calcus/frontend
env_file:
- ./.env
environment:
- CALCUS_DEBUG=True
- CALCUS_CLOUD=True
- CALCUS_TEST=True
- NUM_THREADS=4
- NUM_WORKERS=1
- 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
postgres:
image: postgres:11-bullseye
restart: always
user: "${UID}:${GID}"
volumes:
- ./data:/var/lib/postgresql/data/:rw
- ./docker/postgres/postgresql.conf:/var/lib/postgresql/data/postgresql.conf
- ./backups:/calcus/backups
- ./logs:/calcus/logs
env_file:
- ./.env
environment:
- PGDATA=/var/lib/postgresql/data/
- POSTGRES_USER=calcus
- POSTGRES_DB=calcus
volumes:
scratch: