-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
49 lines (46 loc) · 1.13 KB
/
docker-compose.yaml
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
# $> docker-compose up --build
version: '3.4'
services:
rails:
build:
context: .
dockerfile: dockerfile
env_file: .env
volumes:
- ./project:/myapp
# if you do make changes to your project gems in development,
# you will need to remember to delete gem_cache volume
# before recreating your application service.
- gem_cache:/usr/local/bundle/gems
# if you modify the project’s Node dependencies,
# you will need to remove and recreate this volume.
- node_modules:/app/node_modules
ports:
- "80:3000"
depends_on:
- 'db'
environment:
RAILS_ENV: development
# restart: always
db:
image: postgres:12.1
env_file: .env
# restart: unless-stopped
volumes:
- db_data:/var/lib/postgresql/data
pgadmin:
image: "dpage/pgadmin4"
ports:
- "8080:8080"
env_file: .env # configure postgres
# restart: unless-stopped
depends_on:
- 'db'
volumes:
- ./servers.json:/pgadmin4/servers.json
- pgadmin-data:/var/lib/pgadmin
volumes:
gem_cache:
db_data:
node_modules:
pgadmin-data: