-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
92 lines (91 loc) · 2.2 KB
/
Copy pathdocker-compose.yml
File metadata and controls
92 lines (91 loc) · 2.2 KB
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
name: vita-min
services:
db:
container_name: db
platform: linux/amd64
image: postgis/postgis:13-3.4-alpine
user: postgres
ports:
- 127.0.0.1:${RAILS_DB_PORT:-5432}:5432
volumes:
- database:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${RAILS_DB_USERNAME:-postgres}
POSTGRES_PASSWORD: ${RAILS_DB_PASSWORD:-password}
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "postgres"]
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
worker:
container_name: worker
volumes:
- ./:/app
build:
dockerfile: Dockerfile.local
target: "base"
command: rails jobs:work
depends_on:
web:
condition: service_healthy
environment:
DOCKER: true
RAILS_DB_HOST: db
RAILS_DB_USERNAME: ${RAILS_DB_USERNAME:-postgres}
RAILS_DB_PORT: ${RAILS_DB_PORT:-5432}
RAILS_DB_PASSWORD: ${RAILS_DB_PASSWORD:-password}
web:
container_name: web
build:
dockerfile: Dockerfile.local
target: "app"
volumes:
- ./:/app
ports:
- 3000:3000
depends_on:
- db
- shakapacker
links:
- db
- shakapacker
healthcheck:
test: ["CMD", "curl", "-f", "http://0.0.0.0:3000/up"]
interval: 30s
timeout: 30s
retries: 15
environment:
- DOCKER=true
- RAILS_DB_HOST=db
- RAILS_DB_USERNAME=postgres
- RAILS_DB_PORT=5432
- RAILS_DB_PASSWORD=password
- SHAKAPACKER_DEV_SERVER_HOST=shakapacker
shakapacker:
container_name: shakapacker
build:
dockerfile: Dockerfile.local
target: "base"
volumes:
- ./:/app
ports:
- 3035:3035
command: "bin/shakapacker-dev-server --client-web-socket-url auto://0.0.0.0:3035/ws"
environment:
- SHAKAPACKER_DEV_SERVER_HOST=shakapacker
chrome:
container_name: chrome
image: selenium/standalone-chrome:4.15.0 # this version should match that of the selenium-webdriver gem (see Gemfile)
ports:
- 4444:4444
pgadmin:
container_name: pgadmin
profiles: ["pgadmin"]
image: chorss/docker-pgadmin4
ports:
- 5050:5050
depends_on:
- web
volumes:
database: