-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
121 lines (110 loc) · 2.89 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
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
version: '2.3'
services:
sovereign:
build:
context: .
dockerfile: '${DOCKER_FILE:-Dockerfile}'
target: production
environment:
SOVEREIGN_HOST: '0.0.0.0'
SOVEREIGN_PORT: '8080'
SOVEREIGN_DEBUG: 'yes'
# This key is for local development only
SOVEREIGN_ENCRYPTION_KEY: >
dU9QkiO3JTDdVXzgtUqr_HPuH4hbLBarrAQmsM1_PKk=:fernet
KjDxQrHuNrPRHICv1Qef6Sr_XHxsv7oarJdwB98R2wk=:fernet
# Example passwords
SOVEREIGN_AUTH_PASSWORDS: 'helloworld,2398yud32r9y#@8d23rydr398d2r39y@@2rd39nd2%%r3y98!!!!'
SOVEREIGN_ENVIRONMENT_TYPE: local
SOVEREIGN_CONFIG: file://test/config/config.yaml,file://test/config/cache_config.yaml
SOVEREIGN_DISCOVERY_CACHE_REDIS_HOST: redis
SOVEREIGN_DISCOVERY_CACHE_REDIS_PORT: 6379
SOVEREIGN_DISCOVERY_CACHE_REDIS_PASSWORD: "test123"
ports:
- 80:8080
expose:
- 80
networks:
- default
depends_on:
- redis
- statsd
redis:
image: redis:7-alpine
volumes:
- ./redis.conf:/etc/redis/redis.conf
command: ["redis-server", "/etc/redis/redis.conf"]
networks:
- default
envoy:
build:
context: .
dockerfile: Dockerfile.envoy
args:
IMAGE_TAG: "${IMAGE_TAG:?version unset}"
volumes:
- .:/app
- ./logs:/var/log/envoy
depends_on:
- sovereign
working_dir: /app
environment:
ENVOY_UID: '0'
ENVOY_GID: '0'
ENVOY_LOGLEVEL: info
ENVOY_CONFIG: /app/test/config/bootstrap_rest.yaml
ENVOY_ZONE: us-east-1
networks:
- default
tavern-unit:
build:
context: .
dockerfile: Dockerfile
target: testing
command: poetry run coverage run --source=sovereign -m pytest -vv -p no:tavern --tb=short --ignore=test/acceptance --junitxml=/proj/test-reports/unit.xml --durations=5 --spec
volumes:
- ./test-reports:/proj/test-reports
depends_on:
- http_server
environment: &test_env_vars
CONFIG_LOADER_TEST: '{"hello": "world"}'
SOVEREIGN_ENVIRONMENT_TYPE: local
SOVEREIGN_CONFIG: file://test/config/config.yaml
networks:
- default
tavern-acceptance:
build:
context: .
dockerfile: Dockerfile
target: testing
command: >
pytest -vv
--tb=short
--ignore=test/unit
--junitxml=/proj/test-reports/acceptance.xml
--spec
-m "${PYTEST_MARK:-not v1_9_0} or all"
volumes:
- ./test-reports:/proj/test-reports
environment: *test_env_vars
networks:
- default
statsd:
image: jancajthaml/datadog_mock
networks:
- default
http_server:
image: halverneus/static-file-server:latest
volumes:
- ./test/http_config:/web
environment:
DEBUG: true
SHOW_LISTING: true
networks:
- default
networks:
default:
driver: bridge
ipam:
config:
- subnet: 172.16.100.0/28