-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
118 lines (108 loc) · 3.46 KB
/
Copy pathdocker-compose.yml
File metadata and controls
118 lines (108 loc) · 3.46 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
version: "3.9"
# ─────────────────────────────────────────────────────────────
# DockView — Docker Compose
# Run DockView alongside example databases for development/demo
# ─────────────────────────────────────────────────────────────
services:
# ── DockView App local ────────────────────────────────────────────
# dockview:
# build: .
# image: dockview:latest
# container_name: dockview
# ports:
# - "8080:8080"
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock:ro
# restart: unless-stopped
# depends_on:
# - postgres
# - mysql
# - mongo
# - redis
# networks:
# - dockview-net
# dockview:
# image: levichinecherem/dockview:latest
# container_name: dockview
# user: root # ← run as root
# ports:
# - "8080:8080"
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock:rw
# restart: unless-stopped
# depends_on:
# - postgres
# - mysql
# - mongo
# - redis
# networks:
# - dockview-net
# ── PostgreSQL ───────────────────────────────────────────────
postgres:
image: postgres:16-alpine
container_name: demo-postgres
environment:
POSTGRES_DB: appdb
POSTGRES_USER: admin
POSTGRES_PASSWORD: secret123
ports:
- "5432:5432"
volumes:
- pg-data:/var/lib/postgresql/data
networks:
- dockview-net
healthcheck:
test: ["CMD-SHELL", "pg_isready -U admin -d appdb"]
interval: 10s
timeout: 5s
retries: 5
# ── MySQL ────────────────────────────────────────────────────
mysql:
image: mysql:8.0
container_name: demo-mysql
environment:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_DATABASE: shopdb
MYSQL_USER: shopuser
MYSQL_PASSWORD: shoppass
ports:
- "3306:3306"
volumes:
- mysql-data:/var/lib/mysql
networks:
- dockview-net
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
# ── MongoDB ──────────────────────────────────────────────────
mongo:
image: mongo:7.0
container_name: demo-mongo
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: mongosecret
MONGO_INITDB_DATABASE: catalog
ports:
- "27017:27017"
volumes:
- mongo-data:/data/db
networks:
- dockview-net
# ── Redis ────────────────────────────────────────────────────
redis:
image: redis:7.4-alpine
container_name: demo-redis
command: redis-server --requirepass redispass
ports:
- "6379:6379"
networks:
- dockview-net
networks:
dockview-net:
driver: bridge
volumes:
pg-data:
mysql-data:
mongo-data: