-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
82 lines (73 loc) · 1.68 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
version: "3.9"
x-env: &env
BUNDLE_PATH: /bundle
EDITOR: /usr/bin/vim
REDIS_URL: redis://redis:6379/1
DATABASE_URL: postgres://postgres:password@postgres:5432/beast_mode_development
x-app: &app
build: .
image: hopsoft/beast_mode
working_dir: /beast_mode
tty: true
stdin_open: true
environment: *env
networks:
- main
volumes:
- ./:/beast_mode:cached
- bundle:/bundle:delegated
- unsynchronized:/beast_mode/log:delegated
- unsynchronized:/beast_mode/tmp:delegated
volumes:
bundle:
postgres:
unsynchronized:
networks:
main:
services:
postgres:
image: postgres:13.2-alpine
container_name: beast_mode-postgres
restart: unless-stopped
environment:
POSTGRES_PASSWORD: password
networks:
- main
expose:
- 5432
volumes:
- postgres:/var/lib/postgresql/data:delegated
redis:
image: redis:6.2-alpine
container_name: beast_mode-redis
restart: unless-stopped
networks:
- main
expose:
- 6379
shell:
<<: *app
container_name: beast_mode-shell
command: /bin/bash -c "tail -f /dev/null"
webpack:
<<: *app
container_name: beast_mode-webpack
command: /bin/bash -c "yarn && bin/webpack-dev-server"
environment:
<<: *env
WEBPACKER_DEV_SERVER_HOST: 0.0.0.0
ports:
- 3035:3035
web:
<<: *app
container_name: beast_mode-web
command: /bin/bash -c "bundle && bin/rails db:create db:migrate db:seed && rm -f tmp/pids/server.pid && bin/rails s --binding=0.0.0.0 --port=3000"
environment:
<<: *env
WEBPACKER_DEV_SERVER_HOST: webpack
ports:
- 3000:3000
depends_on:
- postgres
- redis
- webpack