-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (64 loc) · 1.76 KB
/
docker-compose.yml
File metadata and controls
65 lines (64 loc) · 1.76 KB
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
volumes:
dbdata:
redis-data:
services:
db:
image: postgres:16-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:
user: root
image: redis:alpine
restart: unless-stopped
volumes:
- redis-data:/data
web:
user: root
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}
docs:
user: root
build:
context: .
target: middleman-build
cache_from:
- ghcr.io/dfe-digital/register-trainee-teachers:${IMAGE_TAG:-main}
image: ghcr.io/dfe-digital/register-trainee-teachers:${IMAGE_TAG:-main}
profiles: ["dev"]
volumes:
- ./tech_docs:/tech_docs
command: bundle exec middleman serve
ports:
- 4567:4567
bg-jobs:
image: ghcr.io/dfe-digital/register-trainee-teachers:${IMAGE_TAG:-main}
command: bundle exec sidekiq -c 5 -C config/sidekiq.all.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