mirror of
https://github.com/R0m1k3/Regisflow.git
synced 2026-10-21 14:18:17 +02:00
Simplify database setup by preconfiguring credentials and instructions
Adds preconfigured PostgreSQL credentials and setup instructions to .env and documentation. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 91318273-c764-4fd4-be04-bdc12c38af32 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/6e755801-08e8-4492-805e-ac3610de5a2a.jpg
This commit is contained in:
1 parent
974684f6d4
commit
780036a232
5 files changed
+95
-29
No files matched your search
+34
-7
@@ -30,12 +30,8 @@ nano .env
|
||||
Éditez le fichier `.env` avec votre serveur PostgreSQL externe :
|
||||
|
||||
```env
|
||||
# Configuration de la base de données EXTERNE
|
||||
DATABASE_URL=postgresql://username:password@IP_SERVEUR:5432/regisflow
|
||||
|
||||
# Exemples :
|
||||
# DATABASE_URL=postgresql://postgres:motdepasse@192.168.1.100:5432/regisflow
|
||||
# DATABASE_URL=postgresql://regisflow:secret@10.0.0.50:5432/regisflow
|
||||
# Configuration de la base de données EXTERNE (PRÉCONFIGURÉE)
|
||||
DATABASE_URL=postgresql://regisflow:RegisFlow2024!@VOTRE_IP_POSTGRES:5432/regisflow
|
||||
|
||||
# Configuration de l'application
|
||||
NODE_ENV=production
|
||||
@@ -48,7 +44,38 @@ SESSION_SECRET=votre-cle-secrete-super-longue-et-complexe
|
||||
TZ=Europe/Paris
|
||||
```
|
||||
|
||||
**Important**: Remplacez `IP_SERVEUR`, `username`, `password` par les vraies valeurs de votre serveur PostgreSQL.
|
||||
### Préparation de votre serveur PostgreSQL
|
||||
|
||||
**1. Se connecter à PostgreSQL :**
|
||||
```sql
|
||||
sudo -u postgres psql
|
||||
```
|
||||
|
||||
**2. Créer l'utilisateur et la base (préconfigurés) :**
|
||||
```sql
|
||||
CREATE USER regisflow WITH PASSWORD 'RegisFlow2024!';
|
||||
CREATE DATABASE regisflow OWNER regisflow;
|
||||
GRANT ALL PRIVILEGES ON DATABASE regisflow TO regisflow;
|
||||
\q
|
||||
```
|
||||
|
||||
**3. Configuration réseau PostgreSQL :**
|
||||
Éditez `/etc/postgresql/*/main/postgresql.conf` :
|
||||
```
|
||||
listen_addresses = '*'
|
||||
```
|
||||
|
||||
Éditez `/etc/postgresql/*/main/pg_hba.conf` :
|
||||
```
|
||||
host regisflow regisflow 0.0.0.0/0 md5
|
||||
```
|
||||
|
||||
**4. Redémarrer PostgreSQL :**
|
||||
```bash
|
||||
sudo systemctl restart postgresql
|
||||
```
|
||||
|
||||
**SEULE MODIFICATION NÉCESSAIRE** : Remplacer `VOTRE_IP_POSTGRES` par l'IP réelle de votre serveur.
|
||||
|
||||
### 3. Lancer l'application
|
||||
|
||||
|
||||
Reference in new issue
Block a user