Files
michaelschiemer/x_ansible/roles/deploy/templates/.env.j2

37 lines
1.2 KiB
Django/Jinja

# Automatisch generierte .env-Datei
# Generiert durch Ansible am {{ ansible_date_time.date }}
COMPOSE_PROJECT_NAME={{ compose_project_name | default('michaelschiemer') }}
# Allgemeine Einstellungen
APP_NAME={{ app_name | default('michaelschiemer') }}
APP_ENV={{ env_vars.APP_ENV | default('production') }}
APP_DEBUG={{ env_vars.APP_DEBUG | default('false') }}
APP_PORT={{ env_vars.APP_PORT | default(80) }}
APP_SSL_PORT={{ env_vars.APP_SSL_PORT | default(443) }}
# Server-Konfiguration
APP_URL={{ 'https' if ssl_enabled | default(false) else 'http' }}://{{ app_domain }}
# Datenbank-Einstellungen
{% if lookup('vars', 'database_host', default=false) %}
DB_CONNECTION=mysql
DB_HOST={{ database_host }}
DB_PORT=3306
DB_DATABASE={{ database_name }}
DB_USERNAME={{ database_user }}
DB_PASSWORD={{ database_password | default('') }}
{% endif %}
# Redis-Konfiguration
{% if lookup('vars', 'redis_host', default=false) %}
REDIS_HOST={{ redis_host }}
REDIS_PASSWORD={{ redis_password | default(null) }}
REDIS_PORT={{ redis_port | default(6379) }}
{% endif %}
# Weitere Umgebungsspezifische Einstellungen
{% for key, value in env_vars.items() if key not in ['APP_ENV', 'APP_DEBUG', 'APP_PORT', 'APP_SSL_PORT'] %}
{{ key }}={{ value }}
{% endfor %}