-
Notifications
You must be signed in to change notification settings - Fork 14
/
docker-compose.yml
50 lines (48 loc) · 1.06 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
version: '3'
services:
api:
build:
context: .
dockerfile: ./Dockerfile
entrypoint: ['./docker_entrypoint.sh']
command: ['bundle', 'exec', 'rails', 'server']
environment:
RAILS_ENV: development
RAKE_ENV: development
DATABASE_URL: "postgres://harvey-api:harvey-api@postgresql:5432/harvey-api_${RAILS_ENV}"
RHOST: redis
ports:
- 3000:3000
expose:
- 3000
volumes:
- ./app:/usr/src/app/app
- ./lib:/usr/src/app/lib
- ./db:/usr/src/app/db
- ./public:/usr/src/app/public
links:
- postgresql
depends_on:
- postgresql
- redis
postgresql:
container_name: postgresql
image: postgres:9.6
environment:
POSTGRES_USER: 'harvey-api'
POSTGRES_PASSWORD: 'harvey-api'
POSTGRES_DB: "harvey-api_${RAILS_ENV}"
ports:
- 5432:5432
- 5555:5432
expose:
- 5555
restart: always
redis:
image: 'redis:4.0.5-alpine'
command: redis-server
hostname: redis
volumes:
- redis-data:/data
volumes:
redis-data: