forked from ever-co/ever-gauzy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
172 lines (162 loc) · 4.45 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
version: '3.7'
services:
nginx:
image: nginx:latest
container_name: production_nginx
volumes:
- .deploy/nginx/nginx.conf:/etc/nginx/nginx.conf
- .deploy/nginx/log/:/etc/nginx/logs
- .deploy/nginx/cache/:/etc/nginx/cache
- /etc/letsencrypt/:/etc/letsencrypt/
ports:
- '8080:8080'
depends_on:
- api
- webapp
links:
- api:${API_HOST:-api}
- webapp:${HOST:-webapp}
networks:
- overlay
db:
image: postgres:11-alpine
container_name: db
restart: always
environment:
POSTGRES_DB: ${DB_NAME:-postgres}
POSTGRES_USER: ${DB_USER:-postgres}
POSTGRES_PASSWORD: ${DB_PASS:-root}
healthcheck:
test:
[
'CMD-SHELL',
'psql postgres://$${POSTGRES_USER}:$${POSTGRES_PASSWORD}@localhost:5432/$${POSTGRES_DB} || exit 1',
]
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- '5432:5432'
networks:
- overlay
pgweb:
image: sosedoff/pgweb
container_name: pgweb
restart: always
depends_on:
- db
links:
- db:${DB_HOST:-db}
environment:
POSTGRES_DB: ${DB_NAME:-postgres}
POSTGRES_USER: ${DB_USER:-postgres}
POSTGRES_PASSWORD: ${DB_PASS:-root}
DATABASE_URL: postgres://${DB_USER:-postgres}:${DB_PASS:-root}@${DB_HOST:-db}:${DB_PORT:-5432}/${DB_NAME:-postgres}?sslmode=disable
ports:
- '8081:8081'
networks:
- overlay
franchise:
image: binakot/franchise
container_name: franchise
restart: always
depends_on:
- db
links:
- db:${DB_HOST:-db}
environment:
PGHOST: ${DB_HOST:-db}
PGDATABASE: ${DB_NAME:-postgres}
PGUSER: ${DB_USER:-postgres}
PGPASSWORD: ${DB_PASS:-root}
PGPORT: ${DB_PORT:-5432}
ports:
- '8082:80'
- '14645:14645'
networks:
- overlay
omnidb:
image: taivokasper/omnidb
container_name: omnidb
restart: always
depends_on:
- db
links:
- db:${DB_HOST:-db}
ports:
- '8083:8080'
- '25482:25482'
networks:
- overlay
adminer:
image: adminer
container_name: adminer
restart: always
depends_on:
- db
links:
- db:${DB_HOST:-db}
environment:
ADMINER_DEFAULT_DB_DRIVER: pgsql
ADMINER_DEFAULT_DB_HOST: ${DB_HOST:-db}
ADMINER_DEFAULT_DB_NAME: ${DB_NAME:-postgres}
ADMINER_DEFAULT_DB_PASSWORD: ${DB_PASS:-root}
ports:
- '8084:8080'
networks:
- overlay
api:
container_name: api
image: gauzy-api:latest
build:
context: .
dockerfile: .deploy/api/Dockerfile
environment:
NODE_ENV: ${NODE_ENV:-development}
DB_HOST: db
env_file:
- .env
restart: on-failure
depends_on:
- db
links:
- db:${DB_HOST:-db}
volumes:
- webapp_node_modules:/srv/gauzy/node_modules
- api_node_modules:/srv/gauzy/apps/api/node_modules
ports:
- 3000:3000:${API_PORT:-3000}
networks:
- overlay
webapp:
container_name: webapp
image: gauzy-webapp:latest
build:
context: .
dockerfile: .deploy/webapp/Dockerfile
args:
API_BASE_URL: ${API_BASE_URL:-http://localhost:3000}
environment:
NODE_ENV: ${NODE_ENV:-development}
env_file:
- .env
restart: on-failure
links:
- db:${DB_HOST:-db}
- api:${API_HOST:-api}
depends_on:
- db
- api
volumes:
- webapp_node_modules:/srv/gauzy/node_modules
ports:
- 4200:${HOST:-4200}
networks:
- overlay
volumes:
webapp_node_modules:
api_node_modules:
postgres_data:
certificates:
networks:
overlay:
driver: bridge