-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.full.yml
136 lines (134 loc) · 3.7 KB
/
docker-compose.full.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
# docker-compose.yaml
version: '3'
services:
tsd:
build:
context: ./docker/php/
image: tsdsystem-app
container_name: app
tty: true
depends_on:
db:
condition: service_healthy
environment:
DB_HOST: "${DB_HOST}"
DB_USER: "${TSD_DB_USER}"
DB_PASSWORD: "${TSD_DB_PASSWORD}"
DB_NAME: "${TSD_DB}"
DB_PORT: "${DB_PORT}"
SERVER_KEY: "${SERVER_KEY}"
APP_ALLOWED_HOSTS: "${APP_ALLOWED_HOSTS}"
ADMIN_ID: "${ADMIN_ID}"
ADMIN_PASSWORD: "${ADMIN_PASSWORD}"
ADMIN_EMAIL: "${ADMIN_EMAIL}"
ENV: "${ENV}"
EPSG_DEGREE: "${EPSG_DEGREE}"
EPSG_M: "${EPSG_M}"
SMTP_HOST: "${SMTP_HOST}"
SMTP_USERNAME: "${SMTP_USERNAME}"
SMTP_PASSWORD: "${SMTP_PASSWORD}"
SMTP_AUTH: "${SMTP_AUTH}"
SMTP_SECURE: "${SMTP_SECURE}"
SMTP_FROM_ADDRESS: "${SMTP_FROM_ADDRESS}"
SMTP_FROM_NAME: "${SMTP_FROM_NAME}"
REG_PATTERN: "${REG_PATTERN}"
healthcheck:
test:
["CMD", "curl", "--fail", "http://localhost/tsdws/version"]
start_period: 5s
interval: 5s
timeout: 5s
retries: 10
restart: unless-stopped
working_dir: /var/www/html/tsdws
volumes:
- ./src:/var/www/html
db:
image: timescale/timescaledb-ha:pg14.2-ts2.6.0-oss-latest
container_name: db
restart: unless-stopped
environment:
- "POSTGRES_USER=${DB_USER}"
- "POSTGRES_PASSWORD=${DB_PASSWORD}"
- "POSTGRES_DB=${DB_USER}"
ports:
- 5432:5432
healthcheck:
test:
["CMD", "pg_isready", "-h", "localhost", "-U", "${POSTGRES_USER}"]
start_period: 15s
interval: 15s
timeout: 15s
retries: 10
volumes:
- "db_data:/home/postgres/pgdata/data"
frontend:
build: ./docker/nginx/
restart: unless-stopped
ports:
- "80:80"
- "443:443"
pgadmin:
image: dpage/pgadmin4:6.8
restart: unless-stopped
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD}
healthcheck:
test:
["CMD", "wget", "-O", "/tmp/ping", "http://localhost:80/misc/ping"]
start_period: 5s
interval: 5s
timeout: 5s
retries: 10
depends_on:
db:
condition: service_healthy
volumes:
- ./docker/timescale/servers.json:/pgadmin4/servers.json
grafana:
image: grafana/grafana-oss:8.4.5
restart: unless-stopped
environment:
PUBLIC_URL: ${PUBLIC_URL}
GF_RENDERING_SERVER_URL: http://renderer:8081/render
GF_RENDERING_CALLBACK_URL: http://grafana:3000/
GF_LOG_FILTERS: rendering:debug
# GF_USERS_ALLOW_SIGN_UP: false
GF_SERVER_DOMAIN: grafana:3000
GF_SERVER_ROOT_URL: ${PUBLIC_URL}/grafana/
GF_SERVER_SERVE_FROM_SUB_PATH: true
GF_SECURITY_ADMIN_PASSWORD__FILE: /run/secrets/grafana_admin_password
GF_SMTP_ENABLED: true
GF_SMTP_HOST: ${SMTP_HOST}:${SMTP_PORT}
GF_SMTP_USER: ${SMTP_USERNAME}
GF_SMTP_PASSWORD: ${SMTP_PASSWORD}
GF_SMTP_FROM_ADDRESS: ${SMTP_FROM_ADDRESS}
GF_SMTP_FROM_NAME: ${SMTP_FROM_NAME}
GF_SMTP_SKIP_VERIFY: ${SMTP_SKIP_VERIFY}
healthcheck:
test:
["CMD", "wget", "http://localhost:3000/healthz", "-O", "/dev/null"]
start_period: 5s
interval: 5s
timeout: 5s
retries: 10
volumes:
- "grafana-storage:/var/lib/grafana"
secrets:
- grafana_admin_password
depends_on:
db:
condition: service_healthy
renderer:
image: grafana/grafana-image-renderer:3.5.0
restart: unless-stopped
depends_on:
db:
condition: service_healthy
volumes:
db_data:
grafana-storage:
secrets:
grafana_admin_password:
file: .grafana_admin_password