-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
42 lines (40 loc) · 1005 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
services:
postgres-16:
image: postgres:16-alpine
volumes:
- postgres-16:/var/lib/postgresql/data
- ./tmp:/tmp/data
ports:
- "5432:5432"
environment:
POSTGRES_HOST_AUTH_METHOD: trust
web: &web
build: .
image: app:1.0.0
stdin_open: true
tty: true
volumes:
- .:/app:cached
- bundle:/app/vendor/bundle
- rails_cache:/app/tmp/cache
tmpfs:
- /tmp
environment:
BUNDLE_PATH: "/app/vendor/bundle"
BOOTSNAP_CACHE_DIR: "/app/vendor/bundle"
WD_INSTALL_DIR: "/usr/local/bin"
HISTFILE: "/app/log/.bash_history"
EDITOR: "vi"
DATABASE_URL: "postgres://postgres:postgres@postgres-16:5432"
RAILS_MASTER_KEY:
depends_on:
- postgres-16
command: bash -c "bundle install --jobs=4 && rm -f tmp/pids/server.pid && bin/rails server -b 0.0.0.0"
expose: ["3000"]
ports: ["3000:3000"]
user: root
working_dir: /app
volumes:
postgres-16:
bundle:
rails_cache: