Docker compose adjustments
This commit is contained in:
73
README.md
73
README.md
@@ -23,24 +23,35 @@ A web application for managing and displaying weekly sermons for New Life Christ
|
||||
|
||||
## Configuration
|
||||
|
||||
This application uses environment variables for configuration. These must be set before building the Docker image.
|
||||
This application uses environment variables configured directly in `docker-compose.yml`. Edit the file to customize your deployment settings.
|
||||
|
||||
### Environment Variables
|
||||
|
||||
| Variable | Description | Required | Default |
|
||||
|----------|-------------|----------|---------|
|
||||
| `SITE_URL` | Public URL where the app is hosted (used for QR codes) | Yes | `https://nlcc.rydertech.us` |
|
||||
| `AUTH_SECRET` | Secret key for authentication sessions | Yes | `change-this-secret-in-production` |
|
||||
| `ADMIN_USERNAME` | Admin login username | Yes | `admin` |
|
||||
| `ADMIN_PASSWORD` | Admin login password | Yes | `admin123` |
|
||||
| Variable | Description | Default |
|
||||
|----------|-------------|---------|
|
||||
| `SITE_URL` | Public URL where the app is hosted (used for QR codes) | `https://nlcc.rydertech.us` |
|
||||
| `AUTH_SECRET` | Secret key for authentication sessions | `change-this-secret-in-production-please` |
|
||||
| `ADMIN_USERNAME` | Initial admin login username | `admin` |
|
||||
| `ADMIN_PASSWORD` | Initial admin login password | `Admin123!` |
|
||||
|
||||
### Setting Up Environment Variables
|
||||
### Customizing Configuration
|
||||
|
||||
Create a `.env` file in the project root:
|
||||
Edit `docker-compose.yml` and update the values in both the `build.args` and `environment` sections:
|
||||
|
||||
```bash
|
||||
SITE_URL=https://your-church-domain.com
|
||||
AUTH_SECRET=your-secure-random-secret-here
|
||||
```yaml
|
||||
services:
|
||||
nlcc-itinerary:
|
||||
build:
|
||||
args:
|
||||
- SITE_URL=https://your-church-domain.com
|
||||
- AUTH_SECRET=your-secure-random-secret-here
|
||||
- ADMIN_USERNAME=your-admin-username
|
||||
- ADMIN_PASSWORD=your-secure-password
|
||||
environment:
|
||||
- SITE_URL=https://your-church-domain.com
|
||||
- AUTH_SECRET=your-secure-random-secret-here
|
||||
- ADMIN_USERNAME=your-admin-username
|
||||
- ADMIN_PASSWORD=your-secure-password
|
||||
```
|
||||
|
||||
**Generate a secure AUTH_SECRET:**
|
||||
@@ -62,26 +73,13 @@ git clone <repository-url>
|
||||
cd nlcc-itinerary
|
||||
```
|
||||
|
||||
2. Create a `.env` file from the example:
|
||||
```bash
|
||||
cp .env.example .env
|
||||
```
|
||||
2. Edit `docker-compose.yml` and configure your settings:
|
||||
- Update `SITE_URL` to your public domain
|
||||
- Generate and set a secure `AUTH_SECRET` (use `openssl rand -hex 32`)
|
||||
- Set your desired `ADMIN_USERNAME` and `ADMIN_PASSWORD`
|
||||
- Make sure to update values in BOTH `build.args` AND `environment` sections
|
||||
|
||||
3. Edit `.env` and configure your settings:
|
||||
```bash
|
||||
# Required: Set your public URL (used for QR codes)
|
||||
SITE_URL=https://your-domain.com
|
||||
|
||||
# Required: Set a secure authentication secret
|
||||
# Generate with: openssl rand -hex 32
|
||||
AUTH_SECRET=your-secure-random-secret-here
|
||||
|
||||
# Required: Set your admin credentials
|
||||
ADMIN_USERNAME=your-admin-username
|
||||
ADMIN_PASSWORD=your-secure-password
|
||||
```
|
||||
|
||||
4. Build and run with Docker Compose:
|
||||
3. Build and run with Docker Compose:
|
||||
```bash
|
||||
docker-compose up -d --build
|
||||
```
|
||||
@@ -90,15 +88,18 @@ The application will be available at `http://localhost:3002` (or your configured
|
||||
|
||||
**Important**: The `SITE_URL` must be set correctly for QR codes to work. This should be the public URL where your application is accessible (e.g., `https://church.example.com`).
|
||||
|
||||
### Admin Credentials
|
||||
### Initial Admin Account
|
||||
|
||||
Admin credentials are now configured via environment variables (`ADMIN_USERNAME` and `ADMIN_PASSWORD`). Set these in your `.env` file before building the Docker image.
|
||||
The initial admin account is created automatically on first run using the credentials specified in `docker-compose.yml`:
|
||||
|
||||
**Default values** (if not set in `.env`):
|
||||
**Default values**:
|
||||
- **Username**: admin
|
||||
- **Password**: admin123
|
||||
- **Password**: Admin123!
|
||||
|
||||
⚠️ **Important**: Always change these default credentials in production by setting `ADMIN_USERNAME` and `ADMIN_PASSWORD` in your `.env` file.
|
||||
⚠️ **Important**:
|
||||
- Change these credentials in `docker-compose.yml` before deploying to production
|
||||
- After the first build, you can change the admin password through the user management interface
|
||||
- Additional users can be created through the registration page
|
||||
|
||||
## Project Structure
|
||||
|
||||
|
||||
Reference in New Issue
Block a user