forked from calblueprint/HomePointrCIC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
66 lines (66 loc) · 1.75 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
x-default_env: &env
environment:
- NODE_ENV=development
- RAILS_ENV=development
- DATABASE_URL=postgres://root@db:5432
- BUNDLE_PATH=/gems
- GEM_PATH=/gems
- GEM_HOME=/gems
- PATH=/usr/local/bundle/bin:/usr/local/bundle/gems/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/gems/bin
version: "3.4"
services:
db:
image: postgres:10-alpine
environment:
- POSTGRES_USER=root
volumes:
- postgres-vol:/var/lib/postgresql/data
spring:
build: .
volumes:
- .:/app:delegated
- spring-vol:/spring:delegated
- gems:/gems:delegated
command: spring server
environment:
- DATABASE_URL=postgres://root@db:5432
- SPRING_TMP_PATH=/spring
- GEM_PATH=/gems
- GEM_HOME=/gems
- PATH=/usr/local/bundle/bin:/usr/local/bundle/gems/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/gems/bin
pid: host
web:
build: .
command: unbuffer bundle exec rails s -p 1337 -b '0.0.0.0'
<<: *env
volumes:
- .:/app:delegated
- spring-vol:/spring:delegated
- gems:/gems:delegated
- npm-cache:/root/.npm:delegated
- node-modules:/app/node_modules:delegated
ports:
- "1337:1337"
depends_on:
- db
- spring
# Uncomment this line if you'd like to enable Webpack Dev Server
- sh
sh:
build: .
command: ./bin/webpack-dev-server
<<: *env
volumes:
- .:/app:delegated
- spring-vol:/spring:delegated
- gems:/gems:delegated
- npm-cache:/root/.npm:delegated
- node-modules:/app/node_modules:delegated
ports:
- "3035:3035" # for Webpack Dev Server, if run from sh
volumes:
spring-vol:
postgres-vol:
gems:
npm-cache:
node-modules: