-
Notifications
You must be signed in to change notification settings - Fork 35
/
docker-compose.yml
122 lines (113 loc) · 2.6 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
version: '2.4'
x-app: &app
build:
context: .dockerdev
dockerfile: Dockerfile
args:
RUBY_VERSION: '3.3.0'
PG_MAJOR: '14'
NODE_MAJOR: '16'
RUBYGEMS_VERSION: '3.5.3'
BUNDLER_VERSION: '2.5.3'
environment: &env
NODE_ENV: development
# RAILS_ENV: ${RAILS_ENV:-development}
image: sugar-dev:1.0.0
tmpfs:
- /tmp
x-backend: &backend
<<: *app
stdin_open: true
tty: true
volumes:
- .:/app:cached
- rails_cache:/app/tmp/cache
- bundle:/usr/local/bundle
- node_modules:/app/node_modules
- packs:/app/public/packs
- .dockerdev/.psqlrc:/root/.psqlrc:ro
- .dockerdev/.bashrc:/root/.bashrc:ro
environment:
<<: *env
BOOTSNAP_CACHE_DIR: /usr/local/bundle/_bootsnap
WEBPACKER_DEV_SERVER_HOST: webpacker
WEB_CONCURRENCY: 1
HISTFILE: /app/log/.bash_history
PSQL_HISTFILE: /app/log/.psql_history
EDITOR: vi
SOLR_HOST: solr
SOLR_PORT: 8983
SUGAR_DB: postgresql
SUGAR_DB_USERNAME: postgres
SUGAR_DB_PASSWORD: postgres
SUGAR_DB_HOST: postgres
depends_on:
postgres:
condition: service_healthy
solr:
condition: service_started
services:
# runner:
# <<: *backend
# command: /bin/bash
# ports:
# - '3000:3000'
# - '3002:3002'
rails:
<<: *backend
command: bin/rails server -b 0.0.0.0
ports:
- '3000:3000'
- '3002:3002'
solid_queue:
<<: *backend
command: bundle exec solid_queue:start
postgres:
image: postgres:14
volumes:
- .dockerdev/.psqlrc:/root/.psqlrc:ro
- postgres:/var/lib/postgresql/data
- ./log:/root/log:cached
environment:
PSQL_HISTFILE: /root/log/.psql_history
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432
healthcheck:
test: pg_isready -U postgres -h 127.0.0.1
interval: 5s
solr:
image: solr:8
ports:
- 8983
volumes:
- ./solr/init:/docker-entrypoint-initdb.d/
- solr:/var/solr
# healthcheck:
# test: >-
# curl -s -A 'healthcheck' http://localhost:8983/solr/test/admin/ping?wt=json \
# | grep -q '"status":"OK"'
# interval: 5s
# timeout: 5s
# retries: 5
# webpacker:
# <<: *app
# command: ./bin/webpack-dev-server
# ports:
# - '3035:3035'
# volumes:
# - .:/app:cached
# - bundle:/usr/local/bundle
# - node_modules:/app/node_modules
# - packs:/app/public/packs
# environment:
# <<: *env
# WEBPACKER_DEV_SERVER_HOST: 0.0.0.0
volumes:
postgres:
bundle:
node_modules:
rails_cache:
packs:
solr: