-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
58 lines (55 loc) · 1.85 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
version: '3'
services:
tariff-api-s3:
image: minio/minio
restart: always
ports:
- "127.0.0.1:9004:9004"
- "127.0.0.1:9994:9994"
volumes:
- tariff-api-s3-volume:/data
environment:
MINIO_ACCESS_KEY: "minio_access_key"
MINIO_SECRET_KEY: "minio_secret_key"
entrypoint: sh
command: -c "mkdir -p /data/tariff-api-bucket && minio server --quiet --address :9004 --console-address :9994 /data"
tariff-api:
build: .
image: tariff-api
ports:
- "8080:8080"
depends_on:
- tariff-api-s3
links:
- tariff-api-s3
environment:
ENVIRONMENT: "development"
TARICAPI_LOG_LEVEL: "DEBUG"
PORT: "8080"
AWS_ACCESS_KEY_ID: "minio_access_key"
AWS_SECRET_ACCESS_KEY: "minio_secret_key"
AWS_BUCKET_NAME: "tariff-api-bucket"
S3_ENDPOINT_URL: "http://tariff-api-s3:9004"
# APIKEYS is actually a list of SHA256 hashes of keys (abc123 and def456,
# respectively here, used only for local tests) - the non-hashed key value
# is used in the X-API-KEY header of test client REST API calls, but
# loaded into the service on startup in its hashed form.
APIKEYS: "6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090,8f61ad5cfa0c471c8cbf810ea285cb1e5f9c2c5e5e5e4f58a3229667703e1587"
# Ditto APIKEYS for APIKEYS_UPLOAD (def456 being non-hashed key value).
APIKEYS_UPLOAD: "8f61ad5cfa0c471c8cbf810ea285cb1e5f9c2c5e5e5e4f58a3229667703e1587"
WHITELIST: 1.2.3.4
WHITELIST_UPLOAD: 1.2.3.4
NUM_PROXIES: 2
PYTHONUNBUFFERED: "1"
command: python taricapi.py
tariff-api-test:
image: tariff-api
command: /app/tests/runtests.sh
environment:
TTF_TEST_INITIAL_DELAY: 1
TTF_TEST_URL: "tariff-api:8080"
links:
- tariff-api
- tariff-api-s3
volumes:
tariff-api-s3-volume: