-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose-dev.yml
64 lines (60 loc) · 1.35 KB
/
docker-compose-dev.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
---
version: '2.4'
services:
db:
image: postgres:${POSTGRES_VERSION:-12-alpine}
ports:
- "15433:5432"
tmpfs:
- /tmp
volumes:
- db-data:/var/lib/postgresql/data
- ./postgres_config.sql:/docker-entrypoint-initdb.d/postgres_config.sql
restart: unless-stopped
healthcheck:
test: pg_isready -U postgres -h 127.0.0.1
interval: 1s
backend:
build:
context: backend
volumes:
- ./backend:/usr/src/app:cached
- rails_cache:/usr/src/app/tmp/cache
- bundle:/bundle
environment:
- RAILS_ENV=${RAILS_ENV:-development}
- BOOTSNAP_CACHE_DIR=/bundle/bootsnap
- MALLOC_ARENA_MAX=2
- WEB_CONCURRENCY=${WEB_CONCURRENCY:-1}
- EDITOR=vi
command: >
sh -c "rm -f /usr/src/app/tmp/pids/server.pid ;
bundle exec rails s -p 8080 -b 0.0.0.0"
ports:
- "8888:8080"
depends_on:
db:
condition: service_healthy
stdin_open: true
tty: true
tmpfs:
- /tmp
frontend:
build:
context: frontend
dockerfile: dev.Dockerfile
volumes:
- ./frontend:/usr/src/app:cached
- node_modules:/usr/src/app/node_modules
- packs:/usr/src/app/public/packs
command: yarn run serve
ports:
- "3333:8080"
tmpfs:
- /tmp
volumes:
db-data:
bundle:
node_modules:
rails_cache:
packs: