forked from scinote-eln/scinote-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
98 lines (93 loc) · 2.48 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
version: '2'
services:
db:
container_name: scinote_db_development
image: postgres:15
volumes:
- scinote_development_postgres:/var/lib/postgresql/data
ports:
- "5432:5432"
environment:
- "POSTGRES_USER=postgres"
- "POSTGRES_PASSWORD=mysecretpassword"
web:
build:
context: .
dockerfile: Dockerfile
image: scinote_web_development
container_name: scinote_web_development
stdin_open: true
tty: true
user: scinote
depends_on:
- db
ports:
- "3000:3000"
command: >
bash -c "rm -f /usr/src/app/tmp/pids/server.pid &&
(bundle check || bundle install) &&
bundle exec rails s -b 0.0.0.0"
environment:
- RAILS_ENV=development
volumes:
- .:/usr/src/app
- scinote_development_bundler:/usr/local/bundle/
- scinote_development_files:/usr/src/app/public/system
- scinote_development_storage:/usr/src/app/storage
webpack:
build:
context: .
dockerfile: Dockerfile
image: scinote_web_development
container_name: scinote_webpack_development
stdin_open: true
tty: true
user: scinote
command: >
bash -c "yarn install && yarn build --watch"
environment:
- NODE_ENV=development
volumes:
- .:/usr/src/app
- scinote_development_bundler:/usr/local/bundle/
- scinote_development_files:/usr/src/app/public/system
css_bundling:
build:
context: .
dockerfile: Dockerfile
image: scinote_web_development
container_name: scinote_css_bundling_development
stdin_open: true
tty: true
user: scinote
command: >
bash -c "yarn build:css --watch"
environment:
- NODE_ENV=development
volumes:
- .:/usr/src/app
- scinote_development_bundler:/usr/local/bundle/
- scinote_development_files:/usr/src/app/public/system
tailwind:
build:
context: .
dockerfile: Dockerfile
image: scinote_web_development
container_name: scinote_tailwind_development
stdin_open: true
tty: true
user: scinote
command: >
bash -c "rails tailwindcss:watch"
environment:
- RAILS_ENV=development
- NODE_ENV=development
volumes:
- .:/usr/src/app
- scinote_development_bundler:/usr/local/bundle/
- scinote_development_files:/usr/src/app/public/system
volumes:
scinote_development_postgres:
scinote_development_bundler:
scinote_development_files:
scinote_development_storage: