generated from DFE-Digital/govuk-rails-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
57 lines (52 loc) · 1.29 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
57
x-app: &app
build:
args:
- BUNDLE_WITHOUT=production review
- EXTRA_PACKAGES=chromium chromium-chromedriver gcompat yarn
context: .
depends_on:
- db
environment:
- DATABASE_URL=postgresql://postgres@db:5432/
- RAILS_ENV=development
- RAILS_LOG_TO_STDOUT=true
- RAILS_SERVE_STATIC_FILES=true
- SECRET_KEY_BASE=abcd1234
volumes:
- .:/app
services:
db:
image: postgres:14-alpine
restart: always
volumes:
- db-data:/var/lib/postgresql/data
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
ops:
build:
dockerfile_inline: |
FROM mcr.microsoft.com/azure-cli:cbl-mariner2.0
RUN mkdir /app
WORKDIR /app
RUN yum install -y awk git jq make postgresql tar unzip
RUN az aks install-cli
RUN curl -O https://releases.hashicorp.com/terraform/1.5.4/terraform_1.5.4_linux_amd64.zip && \
unzip terraform_1.5.4_linux_amd64.zip && \
mv terraform /usr/local/bin/
command: bash
scale: 0
volumes:
- azure-data:/root/.azure
- .:/app
web:
<<: *app
command: bin/dev
ports:
- 3000:3000
shm_size: '512mb' # required for chromium / selenium
worker:
<<: *app
command: bundle exec rake jobs:work
volumes:
azure-data:
db-data: