forked from mogurastore/instagram_rails
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
46 lines (43 loc) · 987 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
version: "3.7"
x-base: &base
image: circleci/ruby:latest-node
# for system test
# image: circleci/ruby:latest-node-browsers
user: root
volumes:
- .:${PWD}
- gem-data:/usr/local/bundle
- yarn-data:/usr/local/share/.cache/yarn
working_dir: ${PWD}
services:
rails:
<<: *base
command: bash -c "rm -f tmp/pids/server.pid && ./bin/rails s -b 0"
depends_on:
- postgres
environment:
DATABASE_URL: postgres://postgres@postgres
LANG: C.UTF-8
WEBPACKER_DEV_SERVER_HOST: webpacker
ports:
- "3000:3000"
webpacker:
<<: *base
command: ./bin/webpack-dev-server
environment:
WEBPACKER_DEV_SERVER_HMR: "true"
WEBPACKER_DEV_SERVER_HOST: 0.0.0.0
ports:
- "3035:3035"
postgres:
image: postgres:alpine
environment:
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- "5432:5432"
volumes:
- pg-data:/var/lib/postgresql/data
volumes:
gem-data:
pg-data:
yarn-data: