-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
82 lines (77 loc) · 2.09 KB
/
docker-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
version: '2.4'
services:
tyk-redis:
image: redis:${REDIS_DOCKER_IMAGE_TAG:-5.0-alpine}
networks:
- tyk
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
interval: 1s
timeout: 3s
retries: 15
tyk-build-bundle:
image: "approov/tyk-gateway:${TYK_DOCKER_IMAGE_TAG:-v4.1}"
build:
context: .
args:
TAG: ${TYK_DOCKER_IMAGE_TAG:-v4.1}
entrypoint: ""
command:
- /opt/tyk-gateway/tyk
- bundle
- build
- -y
- -o
- /opt/tyk-gateway/middleware/bundles/bundle.zip
networks:
- tyk
working_dir: /opt/tyk-gateway/middleware/plugins/python
volumes:
- ./middleware:/opt/tyk-gateway/middleware
tyk-serve-bundle:
image: "approov/tyk-gateway:${TYK_DOCKER_IMAGE_TAG:-v4.1}"
build:
context: .
args:
TAG: ${TYK_DOCKER_IMAGE_TAG:-v4.1}
entrypoint: ""
command:
- python3
- -m
- http.server
networks:
- tyk
working_dir: /opt/tyk-gateway/middleware
volumes:
- ./middleware/bundles:/opt/tyk-gateway/middleware
healthcheck:
test: ["CMD-SHELL", "curl -i http://tyk-serve-bundle:8000/bundle.zip"]
interval: 5s
timeout: 5s
retries: 5
tyk-gateway:
image: "approov/tyk-gateway:${TYK_DOCKER_IMAGE_TAG:-v4.1}"
build:
context: .
args:
TAG: ${TYK_DOCKER_IMAGE_TAG:-v4.1}
ports:
- 127.0.0.1:${TYK_HTTP_PORT:-8080}:8080
networks:
- tyk
volumes:
- ./examples/tyk.standalone.conf:/opt/tyk-gateway/tyk.conf
- ./middleware:/opt/tyk-gateway/middleware
# - ./examples/httpbin.org/apps:/opt/tyk-gateway/apps
# - ./examples/httpbin.org/policies:/opt/tyk-gateway/policies
environment:
- TYK_GW_SECRET=${TYK_GW_SECRET:? Missing .env var TYK_GW_SECRET}
- TYK_LOGLEVEL=${TYK_LOGLEVEL:-info}
- APPROOV_BASE64_SECRET=${APPROOV_BASE64_SECRET:? Missing .env var APPROOV_BASE64_SECRET}
depends_on:
tyk-redis:
condition: service_healthy
tyk-serve-bundle:
condition: service_healthy
networks:
tyk: