-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
122 lines (122 loc) · 2.65 KB
/
compose.yml
File metadata and controls
122 lines (122 loc) · 2.65 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
119
120
121
122
version: "3.9"
services:
minio:
image: minio/minio
container_name: minio
ports:
- "9000:9000" # S3 API
- "9001:9001" # Web console
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
volumes:
- minio_data:/data
networks:
- default-net
command: server /data --console-address ":9001"
minio-init:
image: minio/mc
depends_on:
- minio
entrypoint: >
/bin/sh -c "
sleep 5;
mc alias set myminio http://minio:9000 minioadmin minioadmin &&
mc mb -p myminio/default &&
mc anonymous set download myminio/default;
echo 'MinIO policy set';
"
networks:
- default-net
redis:
image: "redis:latest"
restart: unless-stopped
ports:
- "6379:6379"
networks:
- default-net
db:
image: "postgres"
restart: unless-stopped
ports:
- "5432:5432"
environment:
- POSTGRES_PASSWORD=admin
- POSTGRES_USER=admin
- POSTGRES_DB=sandbox
- PGDATA=/data/postgres
volumes:
- postgres_data:/data/postgres
networks:
- default-net
general-service:
build: ./general
restart: always
env_file:
- ./general/.env
environment:
- NODE_ENV=production
- PORT=8081
- DATABASE_URL=postgresql://admin:admin@db:5432/sandbox
- REDIS_CHANNEL=default
- REDIS_URL=redis://redis:6379
networks:
- default-net
ports:
- 8081:8081
depends_on:
- db
- redis
- minio
watch-service:
build: ./watch
restart: always
env_file:
- ./watch/.env
environment:
- NODE_ENV=production
- PORT=8082
- HOSTNAME=0.0.0.0
- REDIS_CHANNEL=default
- REDIS_URL=redis://redis:6379
- MINIO_HOSTNAME=minio:9000
- MINIO_HOSTNAME_PUBLIC=http://localhost:9000
- MINIO_ACCESS_KEY=minioadmin
- MINIO_SECRET_KEY=minioadmin
- MINIO_BUCKET=default
- DEVICE=cpu
- GENERAL_SERVICE_URL=http://general-service:8081
networks:
- default-net
ports:
- 8082:8082
depends_on:
- db
- redis
- minio
- general-service
gateway-service:
build: ./gateway
restart: always
env_file:
- ./gateway/.env
environment:
- NODE_ENV=production
- PORT=8080
- GENERAL_SERVICE_URL=http://general-service:8081
- WATCH_SERVICE_URL=http://watch-service:8082
networks:
- default-net
ports:
- 8080:8080
depends_on:
- db
- redis
- minio
- general-service
- watch-service
volumes:
minio_data:
postgres_data:
networks:
default-net: