source -> database & config templating
This commit is contained in:
parent
0c1cc86e3e
commit
414473c8c8
0
src/db/init.sql
Normal file
0
src/db/init.sql
Normal file
33
src/templates/docker-compose.yml.j2
Normal file
33
src/templates/docker-compose.yml.j2
Normal file
@ -0,0 +1,33 @@
|
||||
# Do not adjust this file
|
||||
version: '3.1'
|
||||
|
||||
services:
|
||||
{% if db.enabled == true %}
|
||||
ngx_mgmt_db:
|
||||
image: mariadb:latest
|
||||
restart: always
|
||||
environment:
|
||||
{% if db.root_pw is defined %}
|
||||
MARIADB_ROOT_PASSWORD: {{ db.root_pw }}
|
||||
{% endif %}
|
||||
MARIADB_USER: {{ TMPL_DB_USER }}
|
||||
MARIADB_PASSWORD: {{ TMPL_DB_USER_PW }}
|
||||
MARIADB_DATABASE: {{ TMPL_DB_DB }}
|
||||
volumes:
|
||||
{% if db.data_path_mysql is defined %}
|
||||
- {{ data_path_mysql }}:/var/lib/mysql
|
||||
{% else %}
|
||||
- ./src/db/cache/mysql_data:/var/lib/mysql
|
||||
{% endif %}
|
||||
{% if db.data_path_mysql_backup is defined %}
|
||||
- {{ data_path_mysql_backup }}:/var/lib/mysql
|
||||
{% else %}
|
||||
- ./src/db/cache/mysql_backup:/var/lib/mysql
|
||||
{% endif %}
|
||||
ports:
|
||||
{% if db.port is defined %}
|
||||
- {{ port }}:3306
|
||||
{% else %}
|
||||
- 3306:3306
|
||||
{% endif %}
|
||||
{% endif %}
|
Loading…
Reference in New Issue
Block a user