Fix files not moving to new server

This commit is contained in:
2026-08-27 00:14:51 +03:00
parent b3ea30e807
commit 5f2a325301
+18
View File
@@ -20,6 +20,24 @@ The dashboard supports user sign-in and permission-based access. Without signing
A default `admin` account is created automatically. Its initial password is `change-me-in-production`, unless `ADMIN_PASSWORD` is set in `.env` before the web container starts. Sign in at the top of the dashboard and change the initial password by editing the administrator account. Do not use the default password outside local development.
## Move to another server
The Docker image contains the application code, but PostgreSQL data is stored in the named Docker volume `car_service_data`. The volume is not included when copying `docker-compose.yml`, `Dockerfile`, or the source files. Also, `init.sql` runs only when a new PostgreSQL volume is initialized; editing it does not overwrite an existing database.
To move both the application changes and the current data:
1. On the old server, sign in as an administrator, open **Settings**, and select **Download backup**. Copy the downloaded JSON file to the new server.
2. Copy the complete project folder, including `docker-compose.yml`, `Dockerfile`, `server.js`, `init.sql`, `package.json`, `package-lock.json`, and the `public` folder.
3. On the new server, place the backup JSON where it can be selected in the browser, then run:
```powershell
docker compose up -d --build --force-recreate
```
4. Open [http://localhost:3011](http://localhost:3011), sign in as an administrator, open **Settings**, choose the backup JSON, confirm the restore, and wait for the import confirmation.
For a code-only update on a server that already has the correct database volume, copy the changed project files and run `docker compose up -d --build --force-recreate`. Do not run `docker compose down -v` unless you intentionally want to delete the database volume and all stored data.
Check that the database is ready:
```powershell