forked from sergiitk/pagerbeauty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.circleci.yaml
79 lines (75 loc) · 2.68 KB
/
docker-compose.circleci.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
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
version: '3'
services:
pagerbeauty-ci:
image: sergiitk/pagerbeauty:ci-${CIRCLE_SHA1}
environment:
# Use PagerDuty API Mock server for development
PAGERBEAUTY_PD_API_URL: http://mock-pagerduty-api:8090
# API key is required, but Mock PD API will ignore it
PAGERBEAUTY_PD_API_KEY: v2_api_key
# Mock PD API provides three predefined schedules
# UNKNOWN is to ensure incorrect schedules don't prevent valid from loading
PAGERBEAUTY_PD_SCHEDULES: UNKNOWN,P538IZH,PJ1P5JQ,P2RFGIP
# Faster refreshes for dev server
# Schedules and oncalls every 6 seconds
PAGERBEAUTY_REFRESH_RATE_MINUTES: 0.1
# Schedules and oncalls every 3 seconds
PAGERBEAUTY_INCIDENTS_REFRESH_RATE_MINUTES: 0.05
# Verbose
PAGERBEAUTY_LOG_LEVEL: silly
ports:
- '8080:8080'
depends_on:
- mock-pagerduty-api
pagerbeauty-ci-with-auth:
image: sergiitk/pagerbeauty:ci-${CIRCLE_SHA1}
environment:
# Use PagerDuty API Mock server for development
PAGERBEAUTY_PD_API_URL: http://mock-pagerduty-api:8090
# API key is required, but Mock PD API will ignore it
PAGERBEAUTY_PD_API_KEY: v2_api_key
# Test on two schedules
PAGERBEAUTY_PD_SCHEDULES: P538IZH,PJ1P5JQ
# Faster refreshes for dev server
# Schedules and oncalls every 6 seconds
PAGERBEAUTY_REFRESH_RATE_MINUTES: 0.1
# Schedules and oncalls every 3 seconds
PAGERBEAUTY_INCIDENTS_REFRESH_RATE_MINUTES: 0.05
# Verbose
PAGERBEAUTY_LOG_LEVEL: silly
# Run on different port than no auth app
PAGERBEAUTY_HTTP_PORT: 8081
# Basic HTTP authentication
PAGERBEAUTY_HTTP_USER: basic_username_ci
PAGERBEAUTY_HTTP_PASSWORD: basic_password_ci
PAGERBEAUTY_HTTP_ACCESS_TOKEN: 9A37F64B-931B-4767-94D3-E41B92991F7C
ports:
- '8081:8081'
depends_on:
- mock-pagerduty-api
mock-pagerduty-api:
build:
context: .
dockerfile: ./Dockerfile-dev
command: ['yarn', 'run', 'mock:pagerduty_api', '-p', '8090']
ports:
- "8090:8090"
test-acceptance:
build:
context: .
dockerfile: ./Dockerfile-test-acceptance
entrypoint: ''
command: ['./test/test-with-xunit.sh', 'acceptance']
environment:
PAGERBEAUTY_URL: http://pagerbeauty-ci:8080
PAGERBEAUTY_URL_WITH_AUTH: http://pagerbeauty-ci-with-auth:8081
# Basic HTTP authentication
PAGERBEAUTY_HTTP_USER: basic_username_ci
PAGERBEAUTY_HTTP_PASSWORD: basic_password_ci
PAGERBEAUTY_HTTP_ACCESS_TOKEN: 9A37F64B-931B-4767-94D3-E41B92991F7C
volumes:
# Test reports
- ./tmp:/usr/src/app/tmp
depends_on:
- pagerbeauty-ci
- pagerbeauty-ci-with-auth