-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.yml
56 lines (52 loc) · 1.5 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
services:
redis:
image: redis
ports:
- "6379:6379"
db:
image: postgres:14-alpine
# To preserve data between runs of docker compose, we mount a folder from the host machine.
volumes:
- dbdata:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=developmentpassword
ports:
- "5432:5432"
web:
build:
context: .
cache_from:
- ghcr.io/dfe-digital/publish-teacher-training:${IMAGE_TAG:-latest}
- ghcr.io/dfe-digital/publish-teacher-training-middleman:main
image: ghcr.io/dfe-digital/publish-teacher-training:${IMAGE_TAG:-latest}
command: ash -c "rm -f tmp/pids/server.pid && bundle exec rails server -p 3001 -b '0.0.0.0'"
ports:
- "3001:3001"
depends_on:
- db
- redis
environment:
- DB_HOSTNAME=db
- DB_USERNAME=postgres
- DB_PASSWORD=developmentpassword
- CC_TEST_REPORTER_ID=${CC_TEST_REPORTER_ID}
- AGENT_JOBSTATUS=${AGENT_JOBSTATUS}
- REDIS_WORKER_URL=redis://redis:6379
- RAILS_ENV=test
volumes:
- ${PWD}/out:/app/coverage
bgJobs:
image: ghcr.io/dfe-digital/publish-teacher-training:${IMAGE_TAG:-latest}
command: bundle exec sidekiq -c 5 -C config/sidekiq.yml
depends_on:
- web
- db
- redis
environment:
- DB_HOSTNAME=db
- DB_USERNAME=postgres
- DB_PASSWORD=developmentpassword
- SETTINGS__APPLICATION=teacher-training-api-bg
- REDIS_WORKER_URL=redis://redis:6379
volumes:
dbdata: