-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
85 lines (85 loc) · 2.04 KB
/
docker-compose.yml
File metadata and controls
85 lines (85 loc) · 2.04 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
version: '3'
services:
nsqlookupd:
image: nsqio/nsq
command: sh -c 'nsqlookupd'
ports:
- "4160:4160"
- "4161:4161"
nsqd:
image: nsqio/nsq
command: sh -c 'nsqd --lookupd-tcp-address=nsqlookupd:4160'
depends_on:
- nsqlookupd
ports:
- "4150:4150"
- "4151:4151"
nsqadmin:
image: nsqio/nsq
command: sh -c 'nsqadmin --lookupd-http-address=nsqlookupd:4161'
depends_on:
- nsqlookupd
ports:
- "4171:4171"
web: &web
build: .
command: go run cmd/main.go web
volumes:
- .:/go/src/github.com/tehAnswer/zivwi
environment:
DB_URL: postgres://docker:docker@db:5432/zivwi?sslmode=disable
# Use secrets in production accordingly.
JWT_SECRET: humbleBoy
NSQ_URL: "nsqd:4150"
ports:
- 3000:3000
depends_on:
- db
curlz:
image: appropriate/curl
command: sh -c 'curl -d " " "http://nsqd:4151/pub?topic=transfers"'
depends_on:
- nsqd
- nsqlookupd
worker:
build: .
command: go run cmd/main.go worker
volumes:
- .:/go/src/github.com/tehAnswer/zivwi
environment:
DB_URL: postgres://docker:docker@db:5432/zivwi?sslmode=disable
# Use secrets in production accordingly.
JWT_SECRET: humbleBoy
NSQ_URL: "nsqlookupd:4161"
ports: []
depends_on:
- nsqd
- nsqlookupd
- curlz
db:
image: postgres:latest
environment:
POSTGRES_USER: docker
POSTGRES_PASSWORD: docker
POSTGRES_DB: zivwi
volumes:
- /var/lib/postgresql/data
migrate:
build: .
command: bash -c 'sleep 4; cd cmd; ./migrate -path ../migrations -database "postgres://docker:docker@db:5432/zivwi?sslmode=disable" up'
depends_on:
- db
seeds:
build: .
image: golang:latest
command: bash -c 'sleep 6; go run cmd/main.go seeds'
volumes:
- .:/go/src/github.com/tehAnswer/zivwi
environment:
DB_URL: postgres://docker:docker@db:5432/zivwi?sslmode=disable
depends_on:
- db
- migrate
volumes:
bundle:
node: