-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
126 lines (122 loc) · 4.76 KB
/
docker-compose.yml
File metadata and controls
126 lines (122 loc) · 4.76 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
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
118
119
120
121
122
123
124
125
126
services:
db:
image: postgres:18
command: ["postgres", "-c", "max_connections=200"]
volumes:
- app-db-data:/var/lib/postgresql/data/pgdata
- ./docker/init-roles.sql:/docker-entrypoint-initdb.d/10-init-roles.sql:ro
environment:
- PGDATA=/var/lib/postgresql/data/pgdata
- POSTGRES_PASSWORD=password
ports:
- 5432:5432
healthcheck:
test: pg_isready -q -h db -p 5432 -U postgres
interval: 5s
timeout: 30s
retries: 5
migration:
image: "gcr.io/wriveted-api/wriveted-api:${TAG-latest}"
entrypoint: /bin/sh
command: /app/scripts/run-migrations.sh
depends_on:
- db
environment:
- SQLALCHEMY_DATABASE_URI=postgresql://postgres:password@db/postgres
- POSTGRESQL_PASSWORD=password
- POSTGRESQL_SERVER=db
- DATABASE_POOL_SIZE=${DATABASE_POOL_SIZE-10}
- DATABASE_MAX_OVERFLOW=${DATABASE_MAX_OVERFLOW-10}
- SECRET_KEY=CHrUJmNw1haKVSorf3ooW-D6eRooePyo-V8II--We78
- SENDGRID_API_KEY=unused-key-set-for-testing
- SHOPIFY_HMAC_SECRET=unused-key-for-testing
- SLACK_BOT_TOKEN=unused-key-for-testing
- WRIVETED_INTERNAL_API=http://internal:8888
- OPENAI_API_KEY=unused-test-key-for-testing
volumes:
- ./alembic:/app/alembic:rw
build:
context: ./
dockerfile: Dockerfile
cache_from:
- "asia.gcr.io/wriveted-api/wriveted-api/wriveted-api-development:${TAG-latest}"
- "asia.gcr.io/wriveted-api/wriveted-api/wriveted-api:${TAG-latest}"
args:
INSTALL_DEV: ${INSTALL_DEV-false}
api:
image: "gcr.io/wriveted-api/wriveted-api:${TAG-latest}"
entrypoint: uvicorn "app.main:app" --host 0.0.0.0 --reload
depends_on:
- db
environment:
- SQLALCHEMY_DATABASE_URI=postgresql://cloudrun:cloudrun@db/postgres
- SQLALCHEMY_ASYNC_URI=postgresql+asyncpg://cloudrun:cloudrun@db/postgres
- POSTGRESQL_USER=cloudrun
- POSTGRESQL_PASSWORD=cloudrun
- POSTGRESQL_SERVER=db
- DATABASE_POOL_SIZE=${DATABASE_POOL_SIZE-10}
- DATABASE_MAX_OVERFLOW=${DATABASE_MAX_OVERFLOW-10}
- SECRET_KEY=CHrUJmNw1haKVSorf3ooW-D6eRooePyo-V8II--We78
- SENDGRID_API_KEY=unused-key-set-for-testing
- SHOPIFY_HMAC_SECRET=unused-key-for-testing
- METABASE_SECRET_KEY=unused-key-for-testing
- SLACK_BOT_TOKEN=unused-key-for-testing
- UVICORN_PORT=8000
- WRIVETED_INTERNAL_API=http://internal:8888
- SQLALCHEMY_WARN_20=true
- OPENAI_API_KEY=unused-test-key-for-testing
- DEBUG=true
- BACKEND_CORS_ORIGINS=["http://localhost:3000","http://localhost:3001","http://localhost:3002","http://localhost:3005","http://localhost:3006","http://localhost:3007","http://localhost:3008","http://localhost:3009","http://localhost:3010","http://localhost:8080","http://localhost:8000","http://127.0.0.1:8000"]
- DISABLE_EVENT_LISTENER=true
- CSRF_SKIP_COOKIE_VALIDATION=true
- E2E_TEST_AUTH_SECRET=e2e-test-secret-for-local-dev
ports:
- "8000:8000"
volumes:
- ./app:/app/app:rw
- /etc/localtime:/etc/localtime:ro
build:
context: ./
dockerfile: Dockerfile
cache_from:
- "asia.gcr.io/wriveted-api/wriveted-api/wriveted-api-development:${TAG-latest}"
- "asia.gcr.io/wriveted-api/wriveted-api/wriveted-api:${TAG-latest}"
args:
INSTALL_DEV: ${INSTALL_DEV-false}
internal:
image: "gcr.io/wriveted-api/wriveted-api:${TAG-latest}"
entrypoint: gunicorn --workers=1 --worker-class=uvicorn.workers.UvicornWorker --threads=1 --timeout=0 app.internal_api:internal_app
depends_on:
- db
environment:
- SQLALCHEMY_DATABASE_URI=postgresql://cloudrun:cloudrun@db/postgres
- POSTGRESQL_USER=cloudrun
- POSTGRESQL_PASSWORD=cloudrun
- POSTGRESQL_SERVER=db
- SQLALCHEMY_ASYNC_URI=postgresql+asyncpg://cloudrun:cloudrun@db/postgres
- DATABASE_POOL_SIZE=${DATABASE_POOL_SIZE-10}
- DATABASE_MAX_OVERFLOW=${DATABASE_MAX_OVERFLOW-10}
- SECRET_KEY=CHrUJmNw1haKVSorf3ooW-D6eRooePyo-V8II--We78
- SENDGRID_API_KEY=unused-key-set-for-testing
- SHOPIFY_HMAC_SECRET=unused-key-for-testing
- SLACK_BOT_TOKEN=unused-key-for-testing
- PORT=8888
- WRIVETED_INTERNAL_API=http://internal:8888
- SQLALCHEMY_WARN_20=true
- OPENAI_API_KEY=unused-test-key-for-testing
- DISABLE_EVENT_LISTENER=true
ports:
- "8888"
volumes:
- ./app:/app/app:rw
- /etc/localtime:/etc/localtime:ro
build:
context: ./
dockerfile: Dockerfile
cache_from:
- "asia.gcr.io/wriveted-api/wriveted-api/wriveted-api-development:${TAG-latest}"
- "asia.gcr.io/wriveted-api/wriveted-api/wriveted-api:${TAG-latest}"
args:
INSTALL_DEV: ${INSTALL_DEV-false}
volumes:
app-db-data: