-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
47 lines (40 loc) · 1000 Bytes
/
docker-compose.yml
File metadata and controls
47 lines (40 loc) · 1000 Bytes
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
# For bringing up a development runtime with docker
# docker-compose build
# docker-compose up # for everything
# docker-compose up -d postgres # start only postgres in background
# docker-compose up app # start only app server
# docker-compose run test test # run tests
version: '3'
services:
base: &base
build:
context: .
dockerfile: Dockerfile
command: exec /bin/true
environment:
APP_ENV: 'development'
APP_PORT: '3000'
DB_HOST: 'postgres'
DB_PORT: '5432'
DB_USER: 'postgres'
DB_PASS: ''
SERVICES: 'DB_HOST:DB_PORT'
volumes:
- bundle_cache:/srv/bundler
- .:/srv/app
links:
- postgres
app:
<<: *base
command: app
ports:
- 3000:3000
test:
<<: *base
# don't want this to start with a "docker-compose up", but want to be able to
# run tests with "docker-compose run test test"
command: exec /bin/true
postgres:
image: postgres:9.6
volumes:
bundle_cache: