Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
86 lines (86 loc) · 2.21 KB
/
Copy pathdocker-compose.yml
File metadata and controls
86 lines (86 loc) · 2.21 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
version: '3.8'
services:
auditlogcustomerservice:
build: ./auditlogcustomerservice
command: ["go", "run", "main.go"]
ports:
- "4000:4000"
depends_on:
mongo:
condition: service_healthy
redis:
condition: service_healthy
postgres:
condition: service_healthy
mongo:
image: mongo:latest
container_name: mongo
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD}
ports:
- 27017:27017
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh mongo:27017/test --quiet
interval: 10s
timeout: 10s
retries: 3
start_period: 20s
mongo-express:
image: mongo-express
container_name: mongo-express
restart: unless-stopped
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: ${MONGO_USERNAME}
ME_CONFIG_MONGODB_ADMINPASSWORD: ${MONGO_PASSWORD}
ME_CONFIG_MONGODB_SERVER: mongo
depends_on:
- mongo
postgres:
container_name: postgres
image: postgres:latest
restart: always
# volumes:
# - ./db-init-scripts:/docker-entrypoint-initdb.d
environment:
POSTGRES_DB: ${POSTGRES_DB_NAME}
POSTGRES_USER: ${POSTGRES_USERNAME}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- 5432:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
# pgadmin:
# image: dpage/pgadmin4:latest
# container_name: pgadmin4
# restart: always
# ports:
# - "8888:80"
# environment:
# PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
# PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
redis:
image: "redis:latest"
ports:
- "6379:6379"
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
nginx:
restart: always
build: ./nginx
ports:
- "80:80"
- "443:443"
volumes:
- "/etc/nginx/vhost.d"
- "/usr/share/nginx/html"
- "/var/run/docker.sock:/tmp/docker.sock:ro"
- "/etc/nginx/certs"
depends_on:
- auditlogcustomerservice