-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathdocker-compose.yml
73 lines (69 loc) · 1.48 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
version: '3'
services:
exp:
build:
context: .
dockerfile: Dockerfile-exp
volumes:
- ./.local:/tmp/local:ro
links:
- echoserver
- db
depends_on:
- echoserver
- db
environment:
CACHE_CONTROL: max-age=60
DATABASE_URL: postgresql://postgres:password@db/pages
USER_ENVIRONMENT_VARIABLE_KEY: shhhhhhh
app:
build:
context: .
volumes:
- ./src:/app:ro
- ./.local:/tmp/local:ro
links:
- echoserver
- db
depends_on:
- echoserver
- db
environment:
CACHE_CONTROL: max-age=60
DATABASE_URL: postgresql://postgres:password@db/pages
USER_ENVIRONMENT_VARIABLE_KEY: shhhhhhh
echoserver:
# simple python server to log requests during development
build:
context: ./echo-server
dockerfile: Dockerfile
container_name: echoserver
volumes:
- ./echo-server:/code
environment:
PORT: 8989
ports:
- "8989:8989"
db:
build:
context: .
dockerfile: Dockerfile-db
container_name: db
volumes:
- ./tmp/db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d pages"]
interval: 10s
timeout: 5s
retries: 5
environment:
POSTGRES_PASSWORD: password
POSTGRES_USER: postgres
POSTGRES_DB: pages
test:
build:
context: .
dockerfile: Dockerfile-test
container_name: test
volumes:
- ./:/app