-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (54 loc) · 1.26 KB
/
docker-compose.yml
File metadata and controls
59 lines (54 loc) · 1.26 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
version: '2.9'
services:
web:
build:
context: .
target: development
args:
AMBER_ENV: development
NODE_ENV: development
image: amberframework
command: 'amber watch'
# command: 'bash -c "while true; do sleep 1; done"'
working_dir: /app/user
environment:
DATABASE_URL: postgres://admin:password@db:5432/amberframework_development
SMTP_URL: mail:1025
ports:
- '3000:3000'
depends_on:
- db
- mail
volumes:
- '.:/app/user'
migrate:
build:
context: .
target: development
args:
AMBER_ENV: development
NODE_ENV: development
image: amberframework
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/amberframework_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: amberframework_development
volumes:
- 'db:/var/lib/postgres/data'
volumes:
db: