-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
62 lines (62 loc) · 1.22 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
version: '2'
services:
db:
image: postgres
container_name: postgresql
environment:
POSTGRES_DB: gorm
POSTGRES_USER: gorm
POSTGRES_PASSWORD: yatuhashi-api
expose:
- 5432
apiimage:
build:
context: .
dockerfile: Imagefile
image: api-baseimage:1.0
redis:
image: redis:3.2.9
hostname: redis
api:
build:
context: .
dockerfile: Dockerfile
image: apiimage:1.0
container_name: api-revel1
volumes:
- ./correct/:/correct/
environment:
- DBARGS="host=db port=5432 user=gorm dbname=gorm sslmode=disable password=yatuhashi-api"
- HOST=0.0.0.0
- REDIS=redis:6379
- ADMINROLE=adminkey
- ANSWERFILE=/correct/answer
command: ["./run.sh"]
ports:
- 8000:9000
depends_on:
- db
- redis
links:
- redis
- db
api2:
image: apiimage:1.0
container_name: api-revel2
volumes:
- ./correct/:/correct/
environment:
- DBHOST=db
- HOST=0.0.0.0
- REDIS=redis:6379
- ADMINROLE=adminkey
- ANSWERFILE=/correct/answer
command: ["./run.sh"]
ports:
- 8001:9000
depends_on:
- db
- redis
links:
- redis
- db