-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yaml
93 lines (85 loc) · 2 KB
/
docker-compose.dev.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
84
85
86
87
88
89
90
91
92
93
services:
user-srv:
build:
target: development
context: ./backend
dockerfile: ./apps/user/Dockerfile
volumes:
- ./backend:/app
env_file:
- ./backend/.env.development.user
depends_on:
- postgres-db
- redis-cache
- nats
command: ["pnpm", "run", "dev", "user"]
post-srv:
build:
target: development
context: ./backend
dockerfile: ./apps/post/Dockerfile
volumes:
- ./backend:/app
env_file:
- ./backend/.env.development.post
depends_on:
- postgres-db
- redis-cache
- nats
command: ["pnpm", "run", "dev", "post"]
comment-srv:
build:
target: development
context: ./backend
dockerfile: ./apps/comment/Dockerfile
volumes:
- ./backend:/app
env_file:
- ./backend/.env.development.comment
depends_on:
- postgres-db
- redis-cache
- nats
command: ["pnpm", "run", "dev", "comment"]
redis-cache:
image: redis:7.2.5-alpine3.20
volumes:
- redis-cache-vol:/data
postgres-db:
image: postgres:16.2-alpine3.19
environment:
POSTGRES_MULTIPLE_DATABASES: user_db,post_db,comment_db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: 123456
PGDATA: /data/postgres
volumes:
- ./postgres:/docker-entrypoint-initdb.d
- postgres-db-vol:/data/postgres
pgadmin:
image: dpage/pgadmin4:8.4
environment:
PGADMIN_DEFAULT_EMAIL: pgadmin4@pgadmin.org
PGADMIN_DEFAULT_PASSWORD: admin
PGADMIN_CONFIG_SERVER_MODE: "False"
PGADMIN_LISTEN_PORT: 5050
volumes:
- pgadmin:/var/lib/pgadmin
nats:
image: nats:2.10.18-alpine3.20
container_name: nats_main
nginx:
container_name: nginx
image: nginx:stable-alpine3.17
ports:
- "3000:80"
volumes:
- ./nginx/nginx.dev.conf:/etc/nginx/conf.d/default.conf
depends_on:
- pgadmin
- user-srv
- post-srv
- comment-srv
volumes:
pgadmin:
postgres-db-vol:
redis-cache-vol: