mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-09-12 05:00:05 +00:00

- Updated Docker configuration to support PostgreSQL as an alternative to SQLite. - Enhanced DockerEntrypoint.sh to create a database environment file and test PostgreSQL connection. - Introduced database setup functions in install.sh for PostgreSQL installation and configuration. - Added database management options in x-ui.sh, including backup and switching between SQLite and PostgreSQL. - Implemented database configuration retrieval in the web service and controller layers. - Updated frontend settings to include database configuration options. - Added translations for new database settings in multiple languages.
42 lines
No EOL
740 B
Desktop File
42 lines
No EOL
740 B
Desktop File
[Unit]
|
|
Description=PostgreSQL database server for 3x-ui
|
|
Documentation=man:postgres(1)
|
|
After=network.target
|
|
Wants=network.target
|
|
Before=x-ui.service
|
|
|
|
[Service]
|
|
Type=notify
|
|
User=postgres
|
|
Group=postgres
|
|
|
|
# PostgreSQL data directory
|
|
Environment=PGDATA=/var/lib/postgresql/data
|
|
|
|
# PostgreSQL configuration
|
|
ExecStart=/usr/bin/postgres -D ${PGDATA}
|
|
ExecReload=/bin/kill -HUP $MAINPID
|
|
|
|
# Process management
|
|
KillMode=mixed
|
|
KillSignal=SIGINT
|
|
TimeoutSec=0
|
|
|
|
# Restart policy
|
|
Restart=on-failure
|
|
RestartSec=5s
|
|
|
|
# Security settings
|
|
NoNewPrivileges=true
|
|
PrivateTmp=true
|
|
ProtectSystem=strict
|
|
ProtectHome=true
|
|
ReadWritePaths=/var/lib/postgresql
|
|
|
|
# Resource limits
|
|
LimitNOFILE=65536
|
|
LimitNPROC=4096
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
WantedBy=x-ui.service |