-
Notifications
You must be signed in to change notification settings - Fork 114
/
single-host-deployment.yml
93 lines (88 loc) · 2.31 KB
/
single-host-deployment.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
version: "3.5"
networks:
scopesentry-network:
name: scopesentry-network
driver: bridge
services:
mongodb:
image: mongo:7.0.4
container_name: scopesentry-mongodb
restart: always
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
volumes:
- ./data/mongodb:/data/db
healthcheck:
test: [ "CMD", "mongosh", "--eval", "db.adminCommand('ping')" ]
interval: 10s
timeout: 5s
retries: 10
networks:
- scopesentry-network
redis:
image: redis:7.0.11
container_name: scopesentry-redis
restart: always
ports:
- "6379:6379"
command: redis-server --requirepass ${REDIS_PASSWORD}
volumes:
- ./data/redis/data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- scopesentry-network
scope-sentry:
image: autumn27/scopesentry:latest
container_name: scope-sentry
restart: always
ports:
- "8082:80"
environment:
TIMEZONE: Asia/Shanghai
MONGODB_IP: scopesentry-mongodb
MONGODB_PORT: 27017
DATABASE_NAME: ScopeSentry
DATABASE_USER: ${MONGO_INITDB_ROOT_USERNAME}
DATABASE_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
REDIS_IP: scopesentry-redis
REDIS_PORT: 6379
REDIS_PASSWORD: ${REDIS_PASSWORD}
healthcheck:
test: ["CMD-SHELL", "curl -f http://127.0.0.1:8082 || exit 1"]
interval: 30s
timeout: 10s
retries: 10
depends_on:
redis:
condition: service_healthy
mongodb:
condition: service_healthy
networks:
- scopesentry-network
scopesentry-scan:
image: autumn27/scopesentry-scan:latest
network_mode: host
container_name: scopesentry-scan
restart: always
environment:
NodeName: node-test
TimeZoneName: Asia/Shanghai
Mongodb_IP: 127.0.0.1
MONGODB_PORT: 27017
Mongodb_Username: ${MONGO_INITDB_ROOT_USERNAME}
Mongodb_Password: ${MONGO_INITDB_ROOT_PASSWORD}
Redis_IP: 127.0.0.1
Redis_PORT: 6379
Redis_Password: ${REDIS_PASSWORD}
depends_on:
redis:
condition: service_healthy
scope-sentry:
condition: service_healthy