forked from WordPress/openverse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
69 lines (66 loc) · 1.77 KB
/
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
services:
cache:
profiles:
- api
image: docker.io/redis:7.2.5
ports:
- "50263:6379"
web:
profiles:
- api
build:
target: api
additional_contexts:
- packages=../packages/python
args: # Automatically inferred from env vars, unless specified
- SEMANTIC_VERSION=${SEMANTIC_VERSION:-v1.0.0}
- API_PY_VERSION
- OV_PDM_VERSION=${OV_PDM_VERSION}
- PDM_INSTALL_ARGS=--dev
image: openverse-api:${API_PDM_HASH:-latest}
pull_policy: never
# During debugging, use the following command to override.
# command: python -Xfrozen_modules=off -m debugpy --listen 0.0.0.0:5678 run.py
volumes:
- .:/api:z
- ../packages/python:/packages/python:z
ports:
# - "50256:5678" # Uncomment this to map port for debugging.
- "50280:50280"
depends_on:
- db
- es
- cache
env_file:
- env.docker
- .env
stdin_open: true
tty: true
nginx:
profiles:
- api_extra
build:
target: nginx
additional_contexts:
- packages=../packages/python
args: # Automatically inferred from env vars, unless specified
- SEMANTIC_VERSION=${SEMANTIC_VERSION:-v1.0.0}
- API_PY_VERSION
- PDM_INSTALL_ARGS=--dev
image: openverse-api_nginx:${API_PDM_HASH:-latest}
pull_policy: never
ports:
- "50270:8080"
environment:
DJANGO_NGINX_UPSTREAM_URL: web:50280
depends_on:
- web
# Used in API unit tests
httpbin:
profiles:
- api
# Use go-httpbin because it's only 15 MB compared to upstream HTTPBin's 204 MB
# That helps reduce the network burden of spinning up a development environment
image: docker.io/mccutchen/go-httpbin:v2.14.1
expose:
- "8080"