-
Notifications
You must be signed in to change notification settings - Fork 315
/
docker-compose.yml
73 lines (67 loc) · 1.57 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: "2"
services:
etcd:
image: quay.io/coreos/etcd
command: etcd --initial-cluster-state new --listen-client-urls http://0.0.0.0:2379 --advertise-client-urls http://127.0.0.1:2379
volumes:
- "etcd-data:/default.etcd"
environment:
- ETCDCTL_API=3
etcd_config:
build:
context: .
dockerfile: ./Dockerfile-etcd-config
volumes:
- "etcd-data:/default.etcd"
environment:
- ETCDCTL_API=3
- ETCDCTL_ENDPOINTS=etcd:2379
depends_on:
- etcd
links:
- etcd
postgres:
image: "postgres"
volumes:
- "db-data:/var/lib/postgresql/data/pgdata"
environment:
PGDATA: "/var/lib/postgresql/data/pgdata"
POSTGRES_USER: "go_oauth2_server"
POSTGRES_PASSWORD: ""
POSTGRES_DB: "go_oauth2_server"
POSTGRES_HOST_AUTH_METHOD: "trust"
app:
container_name: go_oauth2_server
image: go-oauth2-server:latest
depends_on:
- etcd_config
- postgres
links:
- etcd
- postgres
build:
context: .
dockerfile: ./Dockerfile
ports:
- "8080:8080"
environment:
ETCD_ENDPOINTS: "http://etcd:2379"
command: [runserver]
app_testdata:
container_name: go_oauth2_server_testdata
image: go-oauth2-server:latest
build:
context: .
dockerfile: ./Dockerfile
environment:
ETCD_ENDPOINTS: "http://etcd:2379"
depends_on:
- etcd_config
- postgres
links:
- etcd
- postgres
command: ["loaddata", "oauth/fixtures/test_clients.yml"]
volumes:
etcd-data:
db-data: