forked from hopsoft/turbo_boost-commands
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
46 lines (42 loc) · 1.44 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
version: "3.9"
x-default-app: &default_app
build: .
image: turbo_reflex
tty: true
stdin_open: true
working_dir: /opt/turbo_reflex/test/dummy
environment:
RAILS_ENV: development
volumes:
- bundle:/usr/local/bundle:delegated
- node_modules:/opt/turbo_reflex/node_modules
volumes:
bundle:
node_modules:
services:
# ----------------------------------------------------------------------------
# Shell - Intended for tinkering and running misc commands
# ----------------------------------------------------------------------------
shell:
<<: *default_app
container_name: turbo_reflex-shell
command: /bin/bash -c "tail -f /dev/null"
# ----------------------------------------------------------------------------
# Web - Runs the test/dummy Rails app
# ----------------------------------------------------------------------------
web:
<<: *default_app
container_name: turbo_reflex-web
ports:
- 3000:3000
command: >
/bin/bash -c "git pull --no-rebase github main &&
cd /opt/turbo_reflex &&
bundle &&
yarn &&
cd /opt/turbo_reflex/test/dummy &&
rm -f tmp/pids/server.pid &&
bin/rails db:create db:migrate &&
bin/rails assets:clobber &&
bin/rails assets:precompile &&
bin/rails s --binding=0.0.0.0 --port=3000"