-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
78 lines (73 loc) · 1.78 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
---
version: "3.9"
services:
redis:
image: redis:7.0
ports:
- 6379
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
volumes:
- redis:/data
db:
image: postgres:15
restart: always
environment:
PGUSER: sif
POSTGRES_USER: sif
POSTGRES_PASSWORD: password
POSTGRES_DB: sif
ports:
- 5432:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready", "--database", "stocks_in_the_future_development" ]
interval: 10s
volumes:
- postgres:/var/lib/postgresql/data
stocks:
build:
dockerfile: Dockerfile.dev
context: .
image: stocks:dev
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${APP_PORT:-3000}"]
command: "bin/docker-entrypoint bin/rails server -b 0.0.0.0 -p ${APP_PORT:-3000}"
entrypoint: bin/docker-entrypoint
ports:
- "${APP_PORT:-3000}:${APP_PORT:-3000}"
volumes:
- .:/rails
- bundler:/usr/local/bundle
- node_modules:/rails/node_modules
environment:
RAILS_ENV: development
DATABASE_URL: postgresql://sif:password@db/
BROWSERSLIST_IGNORE_OLD_DATA: true
stocks-js:
image: node:lts-alpine
working_dir: /rails
tty: true
command: sh -c "yarn install && yarn build --watch"
volumes:
- .:/rails
- node_modules:/rails/node_modules
stocks-css:
image: node:lts-alpine
environment:
BROWSERSLIST_IGNORE_OLD_DATA: true
working_dir: /rails
tty: true
command: sh -c "yarn install && yarn build:css --watch=forever"
volumes:
- .:/rails
- node_modules:/rails/node_modules
volumes:
redis:
postgres:
bundler:
node_modules: