-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-nosql.yml
More file actions
87 lines (77 loc) · 2.19 KB
/
Copy pathdocker-compose-nosql.yml
File metadata and controls
87 lines (77 loc) · 2.19 KB
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
version: '3.8'
services:
mongodb:
image: mongo:8.2.7
container_name: mongodb
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example_password
MONGO_INITDB_DATABASE: my_database
ports:
- "27017:27017"
volumes:
- ${CI_PROJECT_DIR}/configs/mongo-db:/docker-entrypoint-initdb.d:ro
healthcheck:
test: [ "CMD", "mongosh", "--eval", "db.adminCommand('ping').ok", "--quiet" ]
interval: 5s
timeout: 5s
retries: 5
start_period: 5s
redis:
image: redis:8.8.1
container_name: redis
command: redis-server --requirepass your_secure_password
ports:
- "6379:6379"
restart: unless-stopped
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 5s
timeout: 5s
retries: 5
start_period: 5s
autotest-example:
container_name: autotest-example
image: gradle:7.6.3-jdk17 # left old and run with ./gradlew
working_dir: /app
environment:
- TZ=Europe/Kiev
- JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8
volumes:
- ${CI_PROJECT_DIR}:/app
depends_on:
mongodb:
condition: service_healthy
command: sh -c "./gradlew clean :java-test-nosql:test -DbugreaperEnv=ci"
############# UI #############
# only for local UI debug
mongo-express:
image: mongo-express:1.0.2-18
container_name: mongo-express
restart: always
ports:
- "8081:8081"
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: example_password
ME_CONFIG_MONGODB_URL: mongodb://root:example_password@mongodb:27017/
ME_CONFIG_BASICAUTH_USERNAME: root #for UI
ME_CONFIG_BASICAUTH_PASSWORD: example_password #for UI
depends_on:
- mongodb
# only for local UI debug
redis-ui:
image: redis/redisinsight:3.4
container_name: redis-insight
ports:
- "8082:5540" # UI
depends_on:
- redis
environment:
# Automatically adds the redis service to the dashboard
- RI_REDIS_HOST=redis
- RI_REDIS_PORT=6379
- RI_REDIS_PASSWORD=your_secure_password
- RI_REDIS_ALIAS=LocalRedis
restart: unless-stopped