-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
48 lines (43 loc) · 984 Bytes
/
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
version: '2'
services:
web:
build: .
image: triathlets
command: 'amber watch'
working_dir: /app/user
environment:
DATABASE_URL: postgres://admin:password@db:5432/triathlets_development
SMTP_URL: mail:1025
ports:
- '3000:3000'
depends_on:
- db
- mail
volumes:
- '.:/app/user'
migrate:
build: .
image: triathlets
command: bash -c 'while ! nc -q 1 db 5432 </dev/null; do sleep 1; done && amber migrate up'
working_dir: /app/user
environment:
DATABASE_URL: postgres://admin:password@db:5432/triathlets_development
volumes:
- '.:/app/user'
depends_on:
- db
mail:
image: drujensen/mailcatcher:latest
ports:
- '1025:1025'
- '1080:1080'
db:
image: postgres
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: password
POSTGRES_DB: triathlets_development
volumes:
- 'db:/var/lib/postgres/data'
volumes:
db: