-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
48 lines (44 loc) · 933 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
version: '3'
services:
db:
image: postgres:9.6
volumes:
- pp-db:/var/lib/postgresql/data
env_file:
- .env
environment:
POSTGRES_DB: ${DATABASE_NAME}
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_PASSWORD: ${DATABASE_PASS}
ports:
- "5432:5432"
web:
build: .
command: bash -l -c "rake db:migrate && rake db:seed && foreman start"
volumes:
- .:/myapp
ports:
- "3000:3000"
stdin_open: true
tty: true
env_file:
- .env
environment:
DATABASE_HOST: db
REDIS_URL: redis://cache:6379/0
depends_on:
- db
- cache
cache:
image: redis:6.2-alpine
ports:
- '6379:6379'
command: redis-server --save 20 1 --loglevel warning
swagger:
image: swaggerapi/swagger-ui
ports:
- "8080:8080"
environment:
API_URL: http://localhost:3000/api/v1/swagger_doc.json
volumes:
pp-db: