-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
49 lines (47 loc) · 997 Bytes
/
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
version: '3'
services:
web:
build:
context: .
volumes:
- .:/app
ports:
- "3000:3000"
environment:
- DATABASE_URL
- RAILS_ENV
- OB_CLIENT_ID
- OB_CLIENT_SECRET
depends_on:
db:
condition: service_healthy
bootstrap:
condition: service_completed_successfully
command: [ "rails", "server", "-b", "0.0.0.0" ]
db:
image: postgres:latest
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 10s
timeout: 5s
retries: 5
volumes:
- .:/usr/src/app
- ./postgres-data:/var/lib/postgresql/data
bootstrap:
build:
context: .
volumes:
- .:/app
environment:
- DATABASE_URL
- RAILS_ENV
- OB_CLIENT_ID
- OB_CLIENT_SECRET
depends_on:
db:
condition: service_healthy
entrypoint: ./bootstrap_entrypoint