-
Notifications
You must be signed in to change notification settings - Fork 2
/
be-api-compose-loadtest.yaml
54 lines (53 loc) · 1.38 KB
/
be-api-compose-loadtest.yaml
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
version: '3.7'
services:
postgres:
container_name: postgres
image: postgres:12.0
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=secret
ports:
- 5432:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
base:
build:
context: ./
dockerfile: Dockerfile
image: generic-block-explorer:latest
command:
- /bin/bash
- -c
- |
echo ok
api:
container_name: api
image: generic-block-explorer:latest
depends_on:
- postgres
- base
ports:
- 8080:8080
environment:
BLOCK_EXPLORER_API_DB_URL: 'postgres://postgres:secret@postgres:5432/postgres?sslmode=disable'
MIGRATE_URL: 'postgres://postgres:secret@postgres:5432/postgres?sslmode=disable'
BLOCK_EXPLORER_API_LISTEN: ':8080'
links:
- postgres
volumes:
- .artifacts/api.yaml:/opt/app/config/api.yaml
- ./load/migrate_cfg/migrate.yaml:/opt/app/config/migrate.yaml
command:
- /bin/bash
- -c
- |
curl https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh > wait.sh
chmod +x wait.sh
./wait.sh "postgres:5432"
printenv
ls -al
./loadtest_migrate --config=/opt/app/config/migrate.yaml
./api --config=/opt/app/config/api.yaml