-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
73 lines (69 loc) · 1.71 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
version: '3.2'
services:
base: &base
image: jellysimulation:1.0.0
build:
context: .
dockerfile: ./Dockerfile
args:
RUBY_VERSION: '2.5.8'
PG_MAJOR: '12'
NODE_MAJOR: '12'
YARN_VERSION: '1.13.0'
BUNDLER_VERSION: '2.1.4'
environment:
- NODE_ENV=development
- RAILS_ENV=development
- WEBPACKER_DEV_SERVER_HOST=webpack
- DB_HOST=postgres
- DB_USER=postgres
- DB_PASSWORD=foobar123
- DATABASE_URL=postgres://postgres:postgres@postgres:5432
- POSTGRES_USER=postgres # needed on init to create role matching DB_USER
- POSTGRES_PASSWORD=foobar123 # needed on init to create role matching DB_USER
- HISTFILE=/app/log/.bash_history
- BOOTSNAP_CACHE_DIR=/usr/local/bundle/_bootsnap
- PSQL_HISTFILE=/app/log/.psql_history
- EDITOR=vi
tmpfs:
- /tmp
volumes:
- '.:/app'
- bundle:/usr/local/bundle
- node_modules:/app/node_modules
links:
- db
db:
image: postgres:12
volumes:
- pgdata:/var/lib/postgresql/data
- '.dockerdev/init.sql:/docker-entrypoint-initdb.d/init.sql'
expose:
- '5432'
ports:
- '5432:5432'
environment:
POSTGRES_HOST_AUTH_METHOD: "trust"
railsapp:
<<: *base
# command: .docker/web-startup.sh
command: .docker/startup.sh
ports:
- '3000:3000'
webpack:
<<: *base
command: ./bin/webpack-dev-server
volumes:
- '.:/app'
- bundle:/usr/local/bundle
- packs:/app/public/packs
- node_modules:/app/node_modules
ports:
- '3035:3035'
environment:
- WEBPACKER_DEV_SERVER_HOST=0.0.0.0
volumes:
bundle:
pgdata:
node_modules:
packs: