-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
43 lines (43 loc) · 940 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
services:
db:
container_name: database
image: postgres:latest
volumes:
- ./tmp/db:/var/lib/postgresql/data
restart: always
expose:
- "5432"
ports:
- "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
redis:
container_name: redis
image: 'redis:latest'
command: redis-server
ports:
- '6360:6360'
server:
container_name: server
build: ./server
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
volumes:
- ./server:/app
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_HOST: db
ports:
- "3000:3000"
depends_on:
- db
client:
container_name: client
build: ./client
image: node:latest
command: npm start
volumes:
- ./client:/app
- /app/node_modules
ports: ['3001:3001']