forked from ruilvo/dxspider-deployment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
141 lines (134 loc) · 4.4 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
# Copyright 2022 Rui Oliveira
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Changes by Joe Fellner OE5JFE <oe5jfe <at> oevsv <dot> at>
# DXSpider with Adminwebconsole , MariaDB, Webviewer of latest spots
version: "3.9"
services:
cluster:
build:
context: ./dxspider
dockerfile: Dockerfile
args:
- SPIDER_VERSION=${CLUSTER_DXSPIDER_BRANCH}
- SPIDER_USERNAME=${CLUSTER_DB_USER}
environment:
- SPIDER_INSTALL_DIR=/spider #don't change that
- CLUSTER_CALLSIGN=${CLUSTER_CALLSIGN}
- CLUSTER_LOCATOR=${CLUSTER_LOCATOR}
- CLUSTER_QTH=${CLUSTER_QTH}
- CLUSTER_SYSOP_NAME=${CLUSTER_SYSOP_NAME}
- CLUSTER_SYSOP_CALLSIGN=${CLUSTER_SYSOP_CALLSIGN}
- CLUSTER_SYSOP_EMAIL=${CLUSTER_SYSOP_EMAIL}
- CLUSTER_SYSOP_BBS_ADDRESS=${CLUSTER_SYSOP_BBS_ADDRESS}
- CLUSTER_LATITUDE=${CLUSTER_LATITUDE}
- CLUSTER_LONGITUDE=${CLUSTER_LONGITUDE}
- SPIDER_USERNAME=${CLUSTER_DB_USER}
- CLUSTER_DSN=dbi:mysql:${CLUSTER_DB_NAME}:${CLUSTER_DB_HOSTNAME}:${CLUSTER_DB_PORT}
- CLUSTER_DBUSER=${CLUSTER_DB_USER}
- CLUSTER_DBPASS=${CLUSTER_DB_PASS}
- CLUSTER_PORT=${CLUSTER_PORT}
- CLUSTER_SYSOP_PORT=${CLUSTER_SYSOP_PORT}
healthcheck:
test: ["CMD", "nc", "-z", "-v", "localhost", "${CLUSTER_PORT}"]
interval: 10s
start_period: 5s
retries: 3
timeout: 60s
depends_on:
cluster-db:
condition: service_healthy
restart: true
volumes:
- ./dxspider/startup:/spider/scripts/startup:ro
- ./dxspider/crontab:/spider/local_cmd/crontab:ro
- ./dxspider/connect:/spider/connect:ro
- cluster_scripts_data:/spider/scripts
- cluster_local_data_data:/spider/local_data # For the Mojo branch
ports:
- ${CLUSTER_PORT}:${CLUSTER_PORT} # DXSpider Cluster
- ${CLUSTER_SYSOP_PORT}:${CLUSTER_SYSOP_PORT} # Sysop Console via ttyd
expose:
- ${CLUSTER_PORT} # DXSpider Cluster
- ${CLUSTER_SYSOP_PORT} # Sysop Console via ttyd
#restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
networks:
- dxspidernet
cluster-db:
image: mariadb
#restart: unless-stopped
environment:
MARIADB_ROOT_PASSWORD: ${CLUSTER_DB_ROOT_PWD}
MARIADB_DATABASE: ${CLUSTER_DB_NAME}
MARIADB_USER: ${CLUSTER_DB_USER}
MARIADB_PASSWORD: ${CLUSTER_DB_PASS}
MARIADB_MYSQL_LOCALHOST_USER: true # Required for healthcheck
healthcheck:
test: ["CMD", "/usr/local/bin/healthcheck.sh", "--su-mysql", "--connect", "--innodb_initialized"]
interval: 15s
start_period: 15s
retries: 3
timeout: 60s
volumes:
- cluster_db:/var/lib/mysql
- ./cluster-db/init:/docker-entrypoint-initdb.d
ports:
- ${CLUSTER_DB_PORT}:3306
networks:
dxspidernet:
aliases:
- ${CLUSTER_DB_HOSTNAME}
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
cluster-web:
build:
context: ./cluster-web
dockerfile: Dockerfile
environment:
- CLUSTERWEB_DB_CONTAINERHOSTNAME=${CLUSTER_DB_HOSTNAME}
- CLUSTERWEB_DB_PORT=${CLUSTER_DB_PORT}
- CLUSTERWEB_USER=${CLUSTER_DB_USER}
- CLUSTERWEB_PASSWORD=${CLUSTER_DB_PASS}
- CLUSTERWEB_DATABASE=${CLUSTER_DB_NAME}
- CLUSTER_CALLSIGN=${CLUSTER_CALLSIGN}
depends_on:
cluster-db:
condition: service_healthy
volumes:
- ./cluster-web/init:/docker-entrypoint-init.d/
ports:
- ${CLUSTER_WEBSERVER_EXPOSEDPORT}:8080 # NGINX internal port 8080
expose:
- ${CLUSTER_WEBSERVER_EXPOSEDPORT}
#restart: unless-stopped
networks:
- dxspidernet
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
volumes:
cluster_scripts_data:
cluster_local_data_data:
cluster_db:
networks:
dxspidernet: