Portainer instructions & markdown lint of README.md

This commit is contained in:
Steve Dogiakos 2025-04-04 16:28:34 -06:00
parent df10a307f1
commit 6ca863e15d

View File

@ -22,7 +22,7 @@ The applications title and logo can be dynamically configured via environment
### Project Structure ### Project Structure
``` ``` bash
kiosk-guestbook/ kiosk-guestbook/
├── app.py # Main Flask application code ├── app.py # Main Flask application code
├── Dockerfile # Dockerfile for building the image ├── Dockerfile # Dockerfile for building the image
@ -54,8 +54,8 @@ kiosk-guestbook/
Before proceeding, youll need to have the example configuration files. These files—example.docker-compose.yml and example.env—are included in the repository. You can download them by cloning the entire repository: Before proceeding, youll need to have the example configuration files. These files—example.docker-compose.yml and example.env—are included in the repository. You can download them by cloning the entire repository:
``` ```bash
git clone <https://github.com/tmdinosaurcenter/kiosk-guestbook.git> git clone https://github.com/tmdinosaurcenter/kiosk-guestbook.git
cd kiosk-guestbook cd kiosk-guestbook
``` ```
@ -66,12 +66,12 @@ If you dont wish to clone the entire repo, you can also download the two file
1. Copy Example Files: 1. Copy Example Files:
From the project root, copy the example files: From the project root, copy the example files:
``` ``` bash
cp example.docker-compose.yml docker-compose.yml cp example.docker-compose.yml docker-compose.yml
cp example.env .env cp example.env .env
``` ```
2. **Edit the `.env` File (Optional):** 2. **Edit the `.env` File (Optional)**
Modify `.env` to customize settings such as `SITE_TITLE`, `LOGO_URL`, `PORT`, etc. Modify `.env` to customize settings such as `SITE_TITLE`, `LOGO_URL`, `PORT`, etc.
@ -83,16 +83,32 @@ Run the following command to pull (or use) the pre-built image and start the con
This command starts the container in detached mode, mounts the persistent volume for the SQLite database, and uses your environment variable settings. This command starts the container in detached mode, mounts the persistent volume for the SQLite database, and uses your environment variable settings.
4. **Access the Application:** 4. **Access the Application**
Open your browser and navigate to `http://<your-server-ip>:8000` (or the port specified in your `.env` file). Open your browser and navigate to `http://<your-server-ip>:8000` (or the port specified in your `.env` file).
### Method 2: Running in Portainer ### Method 2: Running in Portainer
1. 1. **Copy Example Files**
2.
3. ```bash
4. cp example.docker-compose.yml docker-compose.yml
cp example.env stack.env
```
*Note*: Portainer expects the environment file to be named stack.env rather than .env
2. **Edit `docker-compose.yml`**
In the `docker-compose.yml` file, update the environment file reference from `.env` to `stack.env`
3. **Deploy via Portainer**
- Log in to Portainer and navigate to the "Stacks" section.
- Create a new stack and upload or paste your modified docker-compose.yml along with the `stack.env` file.
- Deploy the stack. Portainer will use stack.env for the environment variables.
4. **Access the Application:**
Once deployed, open your browser and navigate to http://<your-server-ip>:8000 (or your specified port) to view the application.
## Logging and Monitoring ## Logging and Monitoring
@ -106,21 +122,21 @@ Open your browser and navigate to `http://<your-server-ip>:8000` (or the port sp
Access the API endpoint to export guest entries by navigating to: Access the API endpoint to export guest entries by navigating to:
`http://<your-server-ip>:8000/guests/api` `http://your-server-ip:8000/guests/api`
This endpoint can be integrated with on-prem automation tools like n8n. This endpoint can be integrated with on-prem automation tools like n8n.
## Additional Notes ## Additional Notes
- **Intranet-Only Deployment:** - **Intranet-Only Deployment**
This application is designed for internal use only and is not exposed to the public internet. This application is designed for internal use only and is not exposed to the public internet.
- **Database Persistence:** - **Database Persistence**
The SQLite database is stored in a Docker volume (guestbook_data), ensuring that data persists even if containers are rebuilt. The SQLite database is stored in a Docker volume (guestbook_data), ensuring that data persists even if containers are rebuilt.
- **Production Considerations:** - **Production Considerations**
The app runs with Gunicorn as a production-ready WSGI server. Adjust worker counts and resource limits as needed based on your servers specifications. The app runs with Gunicorn as a production-ready WSGI server. Adjust worker counts and resource limits as needed based on your servers specifications.
## License: ## License
This project is licensed under the [MIT License](LICENSE).
This project is licensed under the [MIT License](LICENSE).