-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
85 lines (84 loc) · 2.13 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
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:
demo-api-pg:
#build: ./
image: golang:1.15
volumes:
- ./src:/go/src/
working_dir: /go/src/
ports:
- "6552:6552"
depends_on:
- redis
- mongo
- postgres
environment:
- GOPROXY=https://goproxy.cn
- ENV=prod
container_name: secureai-dev-demo-api-pg
entrypoint: go run demo_pg/main.go
demo-api-mongo:
#build: ./
image: golang:1.15
volumes:
- ./src:/go/src/
working_dir: /go/src/
ports:
- "6551:6551"
depends_on:
- redis
- mongo
- postgres
environment:
- GOPROXY=https://goproxy.cn
- ENV=prod
container_name: secureai-dev-demo-api-mongo
entrypoint: go run demo_mongo/main.go
postgres:
image: postgres:13
ports:
- "7000:5432"
volumes:
- ./data/postgres_13:/var/lib/postgresql/data
- ./pg-init.sql:/docker-entrypoint-initdb.d/init.sql
environment:
- POSTGRES_PASSWORD=password
- POSTGRES_USER=test
- POSTGRES_DB=test
container_name: secureai-dev-postgres
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