-
Notifications
You must be signed in to change notification settings - Fork 19
/
docker-compose.yml
57 lines (51 loc) · 1.16 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
services:
rails:
container_name: rails
image: skills-dev/rails
user: "${UID:-1000}"
tty: true
stdin_open: true
environment:
- RAILS_DB_HOST=postgres
env_file: .env
build:
context: ./config/docker/development
dockerfile: Rails.dockerfile
ports:
- 3000:3000
volumes:
- ./:/myapp
- ./tmp/seed:/seed
- ./config/docker/development/home/rails:/home/developer
- /tmp/.X11-unix:/tmp/.X11-unix
- ${GEM_PATH}:/opt/bundle
depends_on:
- postgres
postgres:
container_name: postgres
image: postgres:16
ports:
- 5432:5432
env_file: .env
volumes:
- postgres:/var/lib/postgres
assets:
container_name: assets
image: ruby:3.2
working_dir: /myapp
command: >
/bin/bash -c "
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - &&
apt-get install -y nodejs &&
npm install -g yarn && bin/assets &&
sleep infinity"
volumes:
- ./:/myapp
- bundler_cache:/opt/bundle
- assets_cache:/usr/bin/
depends_on:
- rails
volumes:
bundler_cache:
assets_cache:
postgres: