kopia lustrzana https://github.com/FacilMap/facilmap
Add docker db healthchecks to documentation (#237)
rodzic
5471cb4d7d
commit
8365cf252d
|
@ -1,3 +1,6 @@
|
|||
# This docker-compose file is for internal testing only.
|
||||
# Please refer to the documentation on https://docs.facilmap.org/developers/server/docker.html for how to start FacilMap with docker.
|
||||
|
||||
version: "2"
|
||||
services:
|
||||
facilmap:
|
||||
|
@ -15,6 +18,9 @@ services:
|
|||
DB_PASSWORD: facilmap
|
||||
links:
|
||||
- mysql
|
||||
depends_on:
|
||||
mysql:
|
||||
condition: service_healthy
|
||||
restart: on-failure
|
||||
|
||||
mysql:
|
||||
|
@ -24,6 +30,9 @@ services:
|
|||
MYSQL_USER: facilmap
|
||||
MYSQL_PASSWORD: facilmap
|
||||
MYSQL_RANDOM_ROOT_PASSWORD: "true"
|
||||
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
|
||||
healthcheck:
|
||||
test: mysqladmin ping -h 127.0.0.1 -u $$MYSQL_USER --password=$$MYSQL_PASSWORD
|
||||
ports:
|
||||
- "127.0.0.1:40830:3306"
|
||||
|
||||
|
@ -33,6 +42,8 @@ services:
|
|||
# POSTGRES_USER: facilmap
|
||||
# POSTGRES_PASSWORD: facilmap
|
||||
# POSTGRES_DB: facilmap
|
||||
# healthcheck:
|
||||
# test: pg_isready -d $$POSTGRES_DB
|
||||
# ports:
|
||||
# - "127.0.0.1:40831:5432"
|
||||
|
||||
|
|
|
@ -20,7 +20,10 @@ services:
|
|||
ports:
|
||||
- 8080
|
||||
links:
|
||||
- db
|
||||
- mysql
|
||||
depends_on:
|
||||
mysql:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
USER_AGENT: My FacilMap (https://facilmap.example.org/, facilmap@example.org)
|
||||
TRUST_PROXY: "true"
|
||||
|
@ -36,14 +39,16 @@ services:
|
|||
MAXMIND_LICENSE_KEY:
|
||||
LIMA_LABS_TOKEN: # Get an API key on https://maps.lima-labs.com/ (optional, needed for double-resolution tiles)
|
||||
restart: unless-stopped
|
||||
db:
|
||||
mysql:
|
||||
image: mariadb
|
||||
environment:
|
||||
MYSQL_DATABASE: facilmap
|
||||
MYSQL_USER: facilmap
|
||||
MYSQL_PASSWORD: password
|
||||
MYSQL_RANDOM_ROOT_PASSWORD: "true"
|
||||
cmd: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
|
||||
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
|
||||
healthcheck:
|
||||
test: mysqladmin ping -h 127.0.0.1 -u $$MYSQL_USER --password=$$MYSQL_PASSWORD
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
|
@ -57,7 +62,10 @@ services:
|
|||
ports:
|
||||
- 8080
|
||||
links:
|
||||
- db
|
||||
- postgres
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
USER_AGENT: My FacilMap (https://facilmap.example.org/, facilmap@example.org)
|
||||
TRUST_PROXY: "true"
|
||||
|
@ -73,12 +81,14 @@ services:
|
|||
MAXMIND_LICENSE_KEY:
|
||||
LIMA_LABS_TOKEN: # Get an API key on https://maps.lima-labs.com/ (optional, needed for double-resolution tiles)
|
||||
restart: unless-stopped
|
||||
db:
|
||||
postgres:
|
||||
image: postgis/postgis
|
||||
environment:
|
||||
POSTGRES_USER: facilmap
|
||||
POSTGRES_PASSWORD: password
|
||||
POSTGRES_DB: facilmap
|
||||
healthcheck:
|
||||
test: pg_isready -d $$POSTGRES_DB
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ services:
|
|||
MYSQL_USER: facilmap
|
||||
MYSQL_PASSWORD: facilmap
|
||||
MYSQL_RANDOM_ROOT_PASSWORD: "true"
|
||||
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
|
||||
healthcheck:
|
||||
test: mysqladmin ping -h 127.0.0.1 -u $$MYSQL_USER --password=$$MYSQL_PASSWORD
|
||||
|
||||
|
@ -30,6 +31,9 @@ services:
|
|||
image: facilmap-ci
|
||||
links:
|
||||
- postgres
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "8081:8080"
|
||||
environment:
|
||||
|
|
Ładowanie…
Reference in New Issue