Add templates for mariadb, postgres, and valkey
This commit is contained in:
21
.templates/mariadb.yml
Normal file
21
.templates/mariadb.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
services:
|
||||
db:
|
||||
container_name: db
|
||||
image: docker.io/library/mariadb:11.8.2
|
||||
restart: unless-stopped
|
||||
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-file-per-table=1 --skip-innodb-read-only-compressed
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
|
||||
- MYSQL_USER=${MYSQL_USER}
|
||||
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
|
||||
- MYSQL_DATABASE=${MYSQL_DATABASE}
|
||||
volumes:
|
||||
- ${APPDATA_PATH}//db:/var/lib/mysql
|
||||
ports:
|
||||
- ${DB_PORT}:3306
|
||||
healthcheck:
|
||||
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 10s
|
19
.templates/postgres.yml
Normal file
19
.templates/postgres.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
services:
|
||||
db:
|
||||
container_name: db
|
||||
image: docker.io/library/postgres:17.5
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- POSTGRES_USER=${POSTGRES_USER}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
- POSTGRES_DB=${POSTGRES_DB}
|
||||
volumes:
|
||||
- ${APPDATA_PATH}//db:/var/lib/postgresql/data
|
||||
ports:
|
||||
- ${DB_PORT}:5432
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -d ${POSTGRES_DB} -U ${POSTGRES_USER}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 10s
|
16
.templates/valkey.yml
Normal file
16
.templates/valkey.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
services:
|
||||
valkey:
|
||||
container_name: valkey
|
||||
image: docker.io/valkey/valkey:8.1.3
|
||||
restart: unless-stopped
|
||||
command: valkey-server --save 60 1 --requirepass ${VALKEY_PASSWORD}
|
||||
volumes:
|
||||
- ${APPDATA_PATH}//valkey:/data
|
||||
ports:
|
||||
- ${VALKEY_PORT}:6379
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "echo 'auth ${VALKEY_PASSWORD}\nping' | valkey-cli | grep PONG"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 10s
|
Reference in New Issue
Block a user