-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathdocker-compose.yml
83 lines (75 loc) · 1.82 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
version: "3.2"
services:
cobudget-api:
build: ./api
restart: "unless-stopped"
command: >
bash -c "/wait-for-it.sh cobudget-db:5432 -t 30
; sleep 10
; rm -rf /cobudget-api/tmp
; bundle exec rake db:migrate
; bundle exec rails s -b 0.0.0.0"
env_file: .env.example
ports:
- 3000:3000
volumes:
- ./wait-for-it.sh:/wait-for-it.sh
- ./api:/cobudget-api
depends_on:
- cobudget-db
delayed-job:
build: ./api
restart: "unless-stopped"
command: >
bash -c "/wait-for-it.sh cobudget-api:3000 -t 30
; sleep 5
; bundle exec rake jobs:work"
env_file: .env.example
volumes:
- ./wait-for-it.sh:/wait-for-it.sh
- ./api:/cobudget-api
depends_on:
- cobudget-db
activity-emails:
build: ./api
restart: "unless-stopped"
command: /bin/bash -c "env >/root/env-vars && cron -f"
env_file: .env.example
volumes:
- ./api:/cobudget-api
depends_on:
- cobudget-db
cobudget-ui:
build:
context: ./ui
dockerfile: Dockerfile
command: npm run develop
restart: "unless-stopped"
ports:
- 9000:9000
- 35729:35729
volumes:
- ./ui:/app
environment:
- DOMAIN=cobudget.local
- NODE_ENV=development
- APP_ENV=development
depends_on:
- cobudget-api
cobudget-db:
image: postgres:9.6
restart: "no"
volumes:
- ./docker/initdb.sh:/docker-entrypoint-initdb.d/initdb.sh
ports:
- 5432:5432
environment:
POSTGRES_PASSWORD: cobudget
POSTGRES_USER: cobudget
POSTGRES_DB: cobudget
mailcatcher:
image: ruby:2.4.2
restart: "unless-stopped"
command: bash -c "gem install mailcatcher && mailcatcher --foreground --http-ip 0.0.0.0 --smtp-ip 0.0.0.0"
ports:
- 1080:1080