-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
48 lines (45 loc) · 1.28 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
version: '3.4'
volumes:
dbdata:
services:
db:
image: postgres:13-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
redis:
image: redis
web:
build:
context: .
cache_from:
- ghcr.io/dfe-digital/register-trainee-teachers:${IMAGE_TAG:-main}
image: ghcr.io/dfe-digital/register-trainee-teachers:${IMAGE_TAG:-main}
volumes:
- ./coverage/backend:/app/coverage/backend
command: ash -c "bundle exec rails server -p 3001 -b '0.0.0.0'"
ports:
- 3001:3001
depends_on:
- db
environment:
- DB_HOSTNAME=db
- DB_USERNAME=postgres
- DB_PASSWORD=developmentpassword
- REDIS_CACHE_URL=redis://redis:6379
- SENTRY_DSN=${SENTRY_DSN}
bg-jobs:
image: ghcr.io/dfe-digital/register-trainee-teachers:${IMAGE_TAG:-main}
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=register-trainee-teachers-bg-jobs
- REDIS_QUEUE_URL=redis://redis:6379