3x-ui/x-ui-postgresql.service
izzzzzi 2fbd1d860d feat: add PostgreSQL support and database configuration options
- 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.
2025-05-23 02:00:06 +05:00

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