-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
45 lines (41 loc) · 863 Bytes
/
docker-compose.yml
File metadata and controls
45 lines (41 loc) · 863 Bytes
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
version: '2'
services:
web:
build: .
image: blog-kemalyst
command: 'crystal run src/app.cr'
working_dir: /app/user
environment:
DATABASE_URL: 'postgres://postgres:password@pg:5432/postgres'
ports:
- '80:3000'
volumes:
- '.:/app/user'
depends_on:
- pg
spec:
build: .
command: 'crystal spec'
working_dir: /app/user
volumes_from:
- web
migrate:
image: blog-kemalyst
command: 'crystal run db/migrate.cr'
working_dir: /app/user
environment:
DATABASE_URL: 'postgres://postgres:password@pg:5432/postgres'
volumes_from:
- web
depends_on:
- pg
pg:
image: postgres
environment:
POSTGRES_PASSWORD: 'password'
volumes_from:
- data
data:
image: drujensen/crystal
volumes:
- '/var/lib/postgres/data'