-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
65 lines (65 loc) · 1.54 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
volumes:
db_storage:
driver: local
builds:
driver: local
uploads:
driver: local
services:
db:
image: postgres:13
volumes:
- db_storage:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: password
ports:
- "5432:5432"
hostname: db
web: &web
image: sakazuki
volumes:
- ./app:/sakazuki/app:cached
- ./config:/sakazuki/config:cached
- ./bin:/sakazuki/bin:cached
- ./config.ru:/sakazuki/config.ru:cached
- ./Rakefile:/sakazuki/Rakefile:cached
- ./lib:/sakazuki/lib:cached
- ./db:/sakazuki/db:cached
- ./spec:/sakazuki/spec:cached
- ./public:/sakazuki/public:cached
- uploads:/sakazuki/app/public/uploads:consistent
- builds:/sakazuki/app/assets/builds:consistent
environment:
POSTGRES_USERNAME: postgres
POSTGRES_PASSWORD: password
POSTGRES_HOSTNAME: db
CAPYBARA_SERVER_HOST: web
REMOTE_DRIVER_HOST: selenium
REMOTE_DRIVER_PORT: 4444
build:
context: .
dockerfile: dev.Dockerfile
args:
- "${RUBY_VERSION:-$(< .ruby-version)}"
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
ports:
- "3000:3000"
depends_on:
- db
- selenium
js:
<<: *web
tty: true
ports:
- 3000
command: "yarn build --watch"
css:
<<: *web
ports:
- 3000
command: "yarn build:css --watch"
selenium:
image: selenium/standalone-firefox:latest
shm_size: 512m
ports:
- 4444:4444