-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.test.yml
98 lines (95 loc) · 3.2 KB
/
docker-compose.test.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
services:
app_test:
build:
context: .
args:
- ENV=test
container_name: app_test
volumes:
- ./app:/app/app:ro
- ./batch:/app/batch:ro
- ./tests:/app/tests
- ./tests_v2:/app/tests_v2
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- PYTHONPATH=batch/python
- ENV=test
- DB_HOST=test_database_12
- DATABASE=_test
- DB_USER=gfw
- DB_PASSWORD=postgres # pragma: allowlist secret
- DB_PORT=5432
- DB_HOST_RO=test_database_12
- DATABASE_RO=_test
- DB_USER_RO=gfw_readonly
- DB_PASSWORD_RO=readonly # pragma: allowlist secret
- DB_PORT_RO=5432
- READER_MIN_POOL_SIZE=1
- LOG_LEVEL=debug
- AWS_ACCESS_KEY_ID=testing # pragma: allowlist secret
- AWS_SECRET_ACCESS_KEY=testing # pragma: allowlist secret
- AWS_SECURITY_TOKEN=testing # pragma: allowlist secret
- AWS_SESSION_TOKEN=testing # pragma: allowlist secret
- POLL_WAIT_TIME=1
- ROOT=$PWD
- POSTGRESQL_CLIENT_JOB_DEFINITION=postgres_client_jd
- GDAL_PYTHON_JOB_DEFINITION=gdal_python_jd
- TILE_CACHE_JOB_DEFINITION=tile_cache_jd
- PIXETL_JOB_DEFINITION=pixetl_jd
- AURORA_JOB_QUEUE=aurora_jq
- AURORA_JOB_QUEUE_FAST=aurora_fast_jq
- DATA_LAKE_JOB_QUEUE=data_lake_jq
- DATA_LAKE_BUCKET=gfw-data-lake-test
- TILE_CACHE_BUCKET=gfw-tile-cache-test
- TILE_CACHE_CLOUDFRONT_ID=tile_cache_cloudfront_id
- TILE_CACHE_JOB_QUEUE=tile_cache_jq
- TILE_CACHE_URL=https://tiles.globalforestwatch.org
- TILE_CACHE_CLUSTER=tile_cache_cluster
- TILE_CACHE_SERVICE=tile_cache_service
- PIXETL_JOB_QUEUE=pixetl_jq
- ON_DEMAND_COMPUTE_JOB_QUEUE=cogify_jq
- PIXETL_CORES=1
- MAX_CORES=1
- NUM_PROCESSES=1
- PIXETL_MAX_MEM=3800
- MAX_MEM=3800
- API_URL=http://app_test:9000
- S3_ENTRYPOINT_URL=http://motoserver:50000
- SERVICE_ACCOUNT_TOKEN=testing
- RASTER_ANALYSIS_LAMBDA_NAME=test_raster_analysis
- RW_API_URL=https://staging-api.resourcewatch.org
- API_GATEWAY_ID=test
- API_GATEWAY_INTERNAL_USAGE_PLAN=test
- API_GATEWAY_EXTERNAL_USAGE_PLAN=test
- API_GATEWAY_STAGE_NAME=test
- AWS_GCS_KEY_SECRET_ARN=testing
- AWS_SECRETSMANAGER_URL=http://motoserver:50000
entrypoint: wait_for_postgres.sh /app/.venv/bin/pytest --timeout 480 -vv --cov-report term
depends_on:
- test_database_12
- motoserver
test_database_12:
container_name: gfw-data-api-test-database-12
image: postgis/postgis:12-3.3-alpine
ports:
- "54321:5432"
environment:
- POSTGRES_PORT=5432
- POSTGRES_DB=_test
- POSTGRES_USER=gfw
- POSTGRES_PASSWORD=postgres # pragma: allowlist secret
volumes:
- test_database_data_12:/var/lib/postgresql/data
command: ["postgres", "-c", "log_statement=all"]
restart: on-failure
motoserver:
container_name: motoserver
image: motoserver/moto:4.2.14
ports:
- "${MOTO_PORT-50000}:50000"
environment:
- MOTO_PORT=50000
entrypoint: moto_server -H 0.0.0.0
restart: on-failure
volumes:
test_database_data_12: