feat: Update Docker entrypoint scripts to create admin account on container startup
This commit is contained in:
@@ -134,19 +134,19 @@ When `GIT_REPO_URL` is provided:
|
||||
2. If `GIT_COMMIT` is specified, checkout that specific commit
|
||||
3. Install dependencies from the repository's package.json
|
||||
4. Build the application
|
||||
5. **Create the default admin account automatically**
|
||||
5. **Admin account is created when container starts (not during build)**
|
||||
6. Start the production server
|
||||
|
||||
When `GIT_REPO_URL` is not provided:
|
||||
1. Copy local files into the container
|
||||
2. Install dependencies
|
||||
3. Build the application
|
||||
4. **Create the default admin account automatically**
|
||||
4. **Admin account is created when container starts (not during build)**
|
||||
5. Start the production server
|
||||
|
||||
## Default Admin Account
|
||||
|
||||
Both development and production Docker builds automatically create a default admin account with these credentials:
|
||||
Both development and production Docker containers automatically create a default admin account **when the container starts** (not during build). This ensures the database is properly persisted in mounted volumes.
|
||||
|
||||
- **Email**: `admin@localhost.com`
|
||||
- **Password**: `admin123456`
|
||||
@@ -193,7 +193,9 @@ The script will skip creation if an admin account already exists.
|
||||
- For private repositories, verify authentication tokens/keys
|
||||
|
||||
### Admin Account Issues
|
||||
- If admin creation fails during build, check database initialization
|
||||
- Ensure the database file is writable in the container
|
||||
- If admin creation fails during startup, check database initialization
|
||||
- Ensure the `./data` directory is writable on the host
|
||||
- Database files are persisted in the mounted `./data` volume
|
||||
- Admin account is created on container startup, not during build
|
||||
- If admin already exists, the script will skip creation (this is normal)
|
||||
- To recreate admin account, delete the database and rebuild the container
|
||||
- To recreate admin account, delete the database file in `./data/` and restart the container
|
||||
|
||||
Reference in New Issue
Block a user