-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
103 lines (96 loc) · 2.27 KB
/
docker-compose.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
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
version: '3.8'
services:
pgadmin:
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: admin
ports:
- '5050:80'
depends_on:
- postgres
networks:
- all-service
postgres:
image: postgres:latest
restart: always
environment:
POSTGRES_USER: yourusername
POSTGRES_PASSWORD: yourpassword
POSTGRES_DB: yourdatabase
ports:
- '5432:5432'
healthcheck:
test:
[
'CMD-SHELL',
'pg_isready -U yourusername -d yourdatabase -h localhost -p 5432',
]
interval: 10s
timeout: 5s
retries: 5
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- all-service
nats-streaming:
image: nats-streaming:latest
ports:
- '4222:4222'
- '8222:8222'
networks:
- all-service
# gateway-service:
# image: gateway-service
# build:
# context: ./gateway/
# dockerfile: Dockerfile
# develop:
# watch:
# - action: sync
# path: ./gateway/src
# target: /app/gateway/src
# ignore:
# - .git
# - node_modules
# - action: rebuild
# path: ./gateway/package.json
# environment:
# DATABASE_URL: postgres://yourusername:yourpassword@postgres:5432/yourdatabase
# NATS_URL: nats://nats-streaming:4222
# networks:
# - all-service
# depends_on:
# - postgres
# - nats-streaming
# - user-service
# ports:
# - "3000:3000"
# user-service:
# image: user-service
# build:
# context: ./
# dockerfile: ./user-service/Dockerfile
# develop:
# watch:
# - action: sync
# path: ./user-service/src
# target: /app/user-service/src
# ignore:
# - .git
# - node_modules
# - action: rebuild
# path: ./user-service/package.json
# environment:
# DATABASE_URL: postgres://yourusername:yourpassword@postgres:5432/yourdatabase
# NATS_URL: nats://nats-streaming:4222
# networks:
# - all-service
# depends_on:
# - postgres
# - nats-streaming
networks:
all-service:
driver: bridge
volumes:
postgres_data: