-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
94 lines (88 loc) · 2.18 KB
/
docker-compose.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
94
version: '3.4'
services:
postgres:
image: postgres:13.2-alpine
restart: always
volumes:
- ./back/migrations/:/docker-entrypoint-initdb.d/
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: hh
POSTGRES_DB: hh
POSTGRES_USER: hh
healthcheck:
test: ["CMD-SHELL", "pg_isready -U hh"]
interval: 10s
timeout: 5s
retries: 5
back:
environment:
COOKIE_DOMAIN: "localhost"
HH_OAUTH_CALLBACK_URL: https://app-gowork.ru/backend/oauthcallback
HH_OAUTH_REDIRECT_URL: https://app-gowork.ru/course
HH_OAUTH_CLIENT_ID: "${COMPOSE_HH_OAUTH_CLIENT_ID}"
HH_OAUTH_CLIENT_SECRET: "${COMPOSE_HH_OAUTH_CLIENT_SECRET}"
image: maven:3.6.3-jdk-11
restart: always
working_dir: /mnt/app
command: mvn install exec:java -Dmaven.test.skip=true
volumes:
- gowork-back-maven-repo:/root/.m2
- ./back:/mnt/app:Z
- gowork-back-swagger:/mnt/app/target/api-doc
ports:
- "8080:8080"
links:
- postgres
depends_on:
- postgres
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/status"]
interval: 10s
timeout: 5s
retries: 5
start_period: 180s # first start may be long due to downloading dependencies
back-swagger-ui:
image: swaggerapi/swagger-ui
volumes:
- gowork-back-swagger:/gowork
environment:
- SWAGGER_JSON=/gowork/openapi.json
expose:
- "8080"
links:
- back
depends_on:
- back
back-swagger-ui-nginx:
image: nginx
command: ["nginx", "-g", "daemon off;"]
volumes:
- ./back/swagger-ui/nginx.conf:/etc/nginx/templates/default.conf.template
environment:
- BACK_NAME=back
- BACK_PORT=8080
- SWAGGER_UI_NAME=back-swagger-ui
# this is internal port in virtual network
- SWAGGER_UI_PORT=8080
ports:
- "8082:8082"
links:
- back-swagger-ui
depends_on:
- back-swagger-ui
front:
environment:
BACK_NAME: back
BACK_PORT: 8080
build: ./front
ports:
- "3000:80"
links:
- back
depends_on:
- back
volumes:
gowork-back-maven-repo:
gowork-back-swagger: