-
-
Notifications
You must be signed in to change notification settings - Fork 87
/
Copy pathdocker-compose.yml
63 lines (61 loc) · 1.41 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
version: '2.4'
services:
db:
image: postgres
volumes:
- dbdata:/var/lib/postgresql/data
- ./bin/dbinit:/docker-entrypoint-initdb.d
environment:
POSTGRES_USER: dockerpg
POSTGRES_PASSWORD: supersecret
ports:
- "127.0.0.1:54321:5432"
healthcheck:
test: pg_isready --host=db --user=dockerpg --dbname=abalone_development
app: &app
build: .
image: abalone
environment:
ABALONE_DATABASE_HOSTNAME: db
DATABASE_URL: postgres://dockerpg:supersecret@db
volumes:
- .:/myapp
- apptmp:/myapp/tmp
tmpfs:
- /myapp/tmp/pids
depends_on:
db:
condition: service_healthy
web:
<<: *app
ports:
- "127.0.0.1:3000:3000"
delayed_job:
<<: *app
command: bundle exec rails jobs:work
# These are convenience "services" intended to be "run" once and removed
# not "docker-compose up"'d for a long running process
schema_migrate:
<<: *app
command: bundle exec rails db:migrate
pending_migrations:
<<: *app
command: bundle exec rails db:migrate:status
seeds:
<<: *app
command: bundle exec rails db:seed
console:
<<: *app
command: bundle exec rails console
rspec:
<<: *app
command: bundle exec rspec
rubocop:
<<: *app
command: bundle exec rubocop -a
brakeman:
<<: *app
command: bundle exec brakeman -Aw1 --no-pager
volumes:
dbdata:
apptmp: