-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
83 lines (74 loc) · 1.75 KB
/
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
version: '3.1'
services:
ecommerce-app:
image: ecommerce-app:latest
container_name: ecommerce-app
build: .
ports:
- 3000:3000
depends_on:
- mongo
- postgres
healthcheck:
test: curl -f http://localhost:3000/api/status || exit 1
interval: 1m
timeout: 10s
retries: 2
mongo:
image: mongo:6.0.1
container_name: mongo
ports:
- 27017:27017
environment:
MONGO_INITDB_ROOT_USERNAME: mongo
MONGO_INITDB_ROOT_PASSWORD: mongosecret
volumes:
- mongo-data:/data/db
mongo-express:
image: mongo-express:0.54.0
container_name: mongo-express
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: mongo
ME_CONFIG_MONGODB_ADMINPASSWORD: mongosecret
ME_CONFIG_MONGODB_URL: mongodb://mongo:mongosecret@mongo:27017/
depends_on:
- mongo
postgres:
image: postgres:alpine3.16
container_name: postgres
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data/pgdata
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgressecret
POSTGRES_DB: ecommerce-prod
PGDATA: /var/lib/postgresql/data/pgdata
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4:6.13
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: admin
PGADMIN_CONFIG_SERVER_MODE: 'False'
ports:
- "5480:80"
volumes:
- pgadmin-data:/var/lib/pgadmin
depends_on:
- postgres
redis-stack:
container_name: redis-stack
image: redis/redis-stack:7.0.2-RC2
ports:
- "6379:6379"
volumes:
mongo-data:
driver: local
postgres-data:
driver: local
pgadmin-data:
driver: local