-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose-ci.yml
83 lines (78 loc) · 2.11 KB
/
docker-compose-ci.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
version: '3.3'
services:
school-experience:
image: ${IMAGE}
command: "frontend"
ports:
- "3000:3000"
restart: always
healthcheck:
disable: true
environment:
- RAILS_ENV=servertest
- DATABASE_URL=postgis://postgres:secret@postgres/school_experience
- REDIS_URL=redis://redis:6379/1
- SECRET_KEY_BASE=stubbed
- SKIP_FORCE_SSL=true
- WEB_URL=postgis://postgres:secret@postgres/school_experience
depends_on:
- db-tasks
volumes:
- .:/ci_build
- ${PWD}/out:/app/out
- ${PWD}/coverage:/app/coverage
sidekiq-jobs:
image: ${IMAGE}
command: "sidekiq"
restart: always
healthcheck:
disable: true
environment:
- RAILS_ENV=servertest
- DATABASE_URL=postgis://postgres:secret@postgres/school_experience
- REDIS_URL=redis://redis:6379/1
- SECRET_KEY_BASE=stubbed
- SKIP_FORCE_SSL=true
- WEB_URL=postgis://postgres:secret@postgres/school_experience
depends_on:
- db-tasks
db-tasks:
image: ${IMAGE}
command: "database"
restart: on-failure
healthcheck:
disable: true
environment:
- RAILS_ENV=test
- DATABASE_URL=postgis://postgres:secret@postgres/school_experience
- REDIS_URL=redis://redis:6379/1
- SECRET_KEY_BASE=stubbed
- SKIP_FORCE_SSL=true
- WEB_URL=postgis://postgres:secret@postgres/school_experience
volumes:
- .:/ci_build
- ${PWD}/out:/app/out
- ${PWD}/coverage:/app/coverage
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
postgres:
image: postgis/postgis:13-3.1-alpine
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=school_experience
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:5-alpine
healthcheck:
test: ["CMD", "redis-cli","ping"]
interval: 5s
timeout: 5s
retries: 5