-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
executable file
·71 lines (68 loc) · 1.97 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
version: '3'
volumes:
object-vol: # Volume to host s3 service data locally.
driver: 'local'
data-vol: # Volume to host db service data locally.
driver: 'local'
services:
s3:
image: minio/minio
ports:
- "9000:9000"
volumes:
- object-vol:/export
environment:
- "MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE"
- "MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
command: server /export
container_name: storage-cont
db:
image: postgres:latest
ports:
- "5432:5432" # host:container
volumes:
- data-vol:/var/lib/postgresql/data
environment:
- POSTGRES_USER=postgres
- POSTGRES_DBNAME=sample
- POSTGRES_PASSWORD=mypass
- POSTGRES_PORT=5432
container_name: db-cont
redis:
image: redis:alpine
ports:
- "6379"
container_name: kvs-cont
proxy:
image: nginx:latest
ports:
- "80:80" # host:container
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
# connect host's ./nginx.conf with container's nginx.conf
# :ro == read only perms in container
links:
- go:app
depends_on:
- go
container_name: proxy-cont
go:
build: .
links:
- db:db
- s3:s3
- redis:redis
# [other container]:[alias in this container]
# this will create environment variables in the go container
# with ip and port info for the postgres container
# also creates entries in /etc/hosts with ip info
depends_on:
- db
- s3
- redis
ports:
- "8080:8080" # host:container
volumes:
- .:/go/src/github.com/monstar-lab/fr-circle-api
container_name: go-cont