-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
110 lines (99 loc) · 2.19 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
104
105
106
107
108
109
110
version: '3.8'
volumes:
frontend:
# external: true
services:
gateway:
build: ./gateway
ports:
- 80:80
restart: always
volumes:
- frontend:/usr/share/nginx/html/
depends_on:
- frontend
- auth
- user
- tag
- post
frontend:
build: ./frontend
volumes:
- frontend:/app/dist
auth:
build: ./auth
restart: always
depends_on:
- auth_db
environment:
DATABASE_URL: postgresql://prisma:prisma@auth_db:5432/prisma
TOKEN_AGE: 2h
REFRESH_TOKEN_AGE: 3h
DEBUG: 'jpg:*'
command: sh -c "npx prisma db push && node ./bin/start.js"
user:
build: ./user
restart: always
depends_on:
- user_db
environment:
DATABASE_URL: postgresql://prisma:prisma@user_db:5432/prisma
BASE_URL: http://gateway/api
DEBUG: jpg:*
command: sh -c "npx prisma db push && node ./bin/start.js"
post:
build: ./post
restart: always
depends_on:
- post_db
environment:
DATABASE_URL: postgresql://prisma:prisma@post_db:5432/prisma
BASE_URL: http://gateway/api
DEBUG: jpg:*
command: sh -c "npx prisma db push && node ./bin/start.js"
tag:
build: ./tags
restart: always
depends_on:
- tag_db
environment:
DATABASE_URL: postgresql://prisma:prisma@tag_db:5432/prisma
BASE_URL: http://gateway/api
DEBUG: jpg:*
command: sh -c "npx prisma db push && node ./bin/start.js"
auth_db:
image: postgres:13
restart: always
ports:
- '5000:5432'
environment:
POSTGRES_USER: prisma
POSTGRES_PASSWORD: prisma
POSTGRES_DB: prisma
user_db:
image: postgres:13
restart: always
ports:
- '5001:5432'
environment:
POSTGRES_USER: prisma
POSTGRES_PASSWORD: prisma
POSTGRES_DB: prisma
post_db:
image: postgres:13
restart: always
ports:
- '5002:5432'
environment:
POSTGRES_USER: prisma
POSTGRES_PASSWORD: prisma
POSTGRES_DB: prisma
tag_db:
image: postgres:13
restart: always
ports:
- '5003:5432'
environment:
POSTGRES_USER: prisma
POSTGRES_PASSWORD: prisma
POSTGRES_DB: prisma