forked from mbentley/docker-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
42 lines (39 loc) · 810 Bytes
/
docker-compose.yml
File metadata and controls
42 lines (39 loc) · 810 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
version: "2"
services:
app:
build: .
entrypoint: /bin/bash
command: -c "sleep 5 && go-wrapper run" # sleep because the postgres container isn't ready on first start
environment:
- "TITLE=Docker Demo"
- "DB_HOST=db"
- "DB_PORT=5432"
- "DB_NAME=demo"
- "DB_USER=demo"
- "DB_PASS=demo"
- "DB_SSL_MODE=disable"
depends_on:
- db
networks:
- docker-demo
ports:
- "8080:8080"
expose:
- "8080"
db:
image: postgres:latest
environment:
- "POSTGRES_USER=demo"
- "POSTGRES_PASSWORD=demo"
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- docker-demo
expose:
- "5432"
networks:
docker-demo:
driver: bridge
volumes:
postgres-data:
driver: local