-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.test.yml
42 lines (39 loc) · 1.25 KB
/
docker-compose.test.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
version: '3.8' # latest version as of 10/04/2023
services:
# Build the test image (Dockerfile.test) and run the integration tests. A
# different Dockerfile/container is required as the prod image does not
# contain the go toolchain and hence canot run the tests.
client-auth-test:
image: ashinebourne/client-auth:test
environment:
- JWT_SECRET_KEY=secret
- JWT_TOKEN_EXP_MIN=60
- DB_HOST=client-db
- DB_PORT=27017
- DB_USER=root
- DB_PASSWORD=secret
- DB_NAME=user_management
- REDIS_HOST=client-auth-cache
- REDIS_PORT=6379
- REDIS_PASSWORD=password123
depends_on:
- client-db
- client-auth-cache
# Dcoument database storing user information
client-db:
image: mongo:6.0.5
ports:
- "27017:27017"
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=secret
- MONGO_INITDB_DATABASE=user_management
# Cache service required for live user blackisting (deactivating/bocking
# accounts) and user deletion cascade handling
client-auth-cache:
image: redis:7.0.10-alpine
ports:
- 6379:6379
command: /bin/sh -c "redis-server --requirepass $$REDIS_PASSWORD"
environment:
- REDIS_PASSWORD=password123