-
Notifications
You must be signed in to change notification settings - Fork 16
/
docker-compose.yml
163 lines (155 loc) · 4.09 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
version: "3.9"
name: "gse"
services:
gse-database:
image: mysql:8.3.0
container_name: gse-database
restart: "always"
volumes:
- data:/var/lib/mysql
- ./mysql.cnf:/etc/mysql/conf.d/mysql.cnf
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: gse
MYSQL_USER: gseadmin
MYSQL_PASSWORD: Lugano2020
TZ: UTC
healthcheck:
test: mysqladmin ping -h localhost
start_period: 10s
interval: 10s
timeout: 5s
retries: 5
labels:
- "com.centurylinklabs.watchtower.scope=ghs"
gse-migration:
image: flyway/flyway:10.13.0-alpine
container_name: gse-migrations
restart: "no"
volumes:
- ../flyway/sql:/flyway/sql
environment:
TZ: UTC
FLYWAY_USER: gseadmin
FLYWAY_PASSWORD: Lugano2020
FLYWAY_URL: jdbc:mysql://gse-database:3306/gse?serverTimezone=UTC&useLegacyDatetimeCode=false&useUnicode=yes&characterEncoding=UTF-8&allowPublicKeyRetrieval=true&permitMysqlScheme=true
FLYWAY_SCHEMAS: gse
FLYWAY_DEFAULT_SCHEMA: gse
command: migrate
depends_on:
gse-database:
condition: service_healthy
networks:
- default
gse-backup:
image: tiredofit/db-backup:4.1.0
container_name: gse-backup
restart: "no"
volumes:
- backup:/backup
- ./logs/backup:/logs
environment:
TZ: UTC
TIMEZONE: Etc/UTC
DB01_TYPE: mysql
DB01_HOST: gse-database
DB01_PORT: 3306
DB01_NAME: gse
DB01_USER: gseadmin
DB01_PASS: Lugano2020
DEFAULT_BACKUP_BEGIN: "0000"
DEFAULT_CLEANUP_TIME: "10080"
DEFAULT_CHECKSUM: SHA1
DEFAULT_COMPRESSION: GZ
DEFAULT_CREATE_LATEST_SYMLINK: FALSE
DEBUG_MODE: TRUE
CONTAINER_ENABLE_MONITORING: FALSE
entrypoint: "true"
depends_on:
gse-migration:
condition: service_completed_successfully
labels:
- "com.centurylinklabs.watchtower.scope=ghs"
links:
- gse-database
networks:
- default
gse-server:
build:
context: ../
dockerfile: docker/server/Dockerfile
image: seart/ghs-server:preview
container_name: gse-server
volumes:
- ./logs:/logs
environment:
LOGGING_FILE_PATH: /tmp
LOGGING_CONFIG: classpath:logback.prod.xml
SPRING_DATASOURCE_URL: jdbc:mysql://gse-database:3306/gse?serverTimezone=UTC&useLegacyDatetimeCode=false&useUnicode=yes&characterEncoding=UTF-8
SPRING_FLYWAY_ENABLED: "false"
GHS_CRAWLER_ENABLED: "false"
GHS_ANALYSIS_ENABLED: "false"
GHS_CLEANUP_ENABLED: "false"
GHS_GITHUB_TOKENS:
ports: ["48001:8080"]
deploy:
restart_policy:
condition: on-failure
max_attempts: 5
depends_on:
gse-migration:
condition: service_completed_successfully
stop_grace_period: 1m
labels:
- "com.centurylinklabs.watchtower.scope=ghs"
networks:
- default
gse-website:
build:
context: ../
dockerfile: docker/website/Dockerfile
image: seart/ghs-website:preview
container_name: gse-website
volumes:
- ./nginx/default.conf.template:/etc/nginx/templates/default.conf.template
environment:
BASE_URL: http://localhost:48001
ports: ["7030:80"]
deploy:
restart_policy:
condition: on-failure
max_attempts: 5
depends_on:
gse-server:
condition: service_healthy
labels:
- "com.centurylinklabs.watchtower.scope=ghs"
networks:
- default
gse-watchtower:
image: tianon/true:latest
container_name: gse-watchtower
restart: "no"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
WATCHTOWER_SCOPE: "ghs"
WATCHTOWER_TIMEOUT: "60s"
WATCHTOWER_SCHEDULE: "0 0 */6 * * *"
WATCHTOWER_LOG_LEVEL: "debug"
WATCHTOWER_INCLUDE_STOPPED: true
depends_on:
gse-website:
condition: service_healthy
labels:
- "com.centurylinklabs.watchtower.scope=ghs"
networks:
- default
volumes:
data:
name: gse-data
backup:
name: gse-data-backups
networks:
default:
name: gse-network