-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
57 lines (56 loc) · 1.48 KB
/
docker-compose.yaml
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
version: '3'
services:
demo-api-mongo:
build: .
image: golang:1.15
volumes:
- ./:/go/src
- ./.netrc:/root/.netrc
working_dir: /go/src
ports:
- "6551:6551"
depends_on:
- redis
- mongo
environment:
- GOPROXY=https://goproxy.cn
- GOPRIVATE=github.com/secure-for-ai
- ENV=prod
container_name: secureai-dev-demo-api-mongo
entrypoint: go run main.go
mongo:
image: mongo:4.2.6
ports:
- "27017:27017"
volumes:
- ./data/mongo:/data/db
# - ./mongod.conf:/etc/mongod.conf
- ./replica-init.js:/docker-entrypoint-initdb.d/replica-init.js
environment:
- MONGO_INITDB_ROOT_USERNAME=test
- MONGO_INITDB_ROOT_PASSWORD=password
- MONGO_INITDB_DATABASE=gtest
container_name: secureai-dev-mongo
# RUN echo "rs.initiate();" > /docker-entrypoint-initdb.d/replica-init.js
command: ["mongod", "--auth", "--bind_ip_all", "--replSet", "rs0" ]
redis:
image: redis
ports:
- "6379:6379"
environment:
- RedisPass=password
volumes:
- ./data/redis:/data
- ./redis.conf:/usr/local/etc/redis/redis.conf
command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
container_name: secureai-dev-redis
nginx:
image: nginx
ports:
- 80:80
volumes:
- ./build:/usr/share/nginx/html
- ./nginx.conf:/etc/nginx/conf.d/default.conf
links:
- demo-api-mongo:demo-api-mongo
container_name: secureai-dev-nginx